Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,6 @@
"cfenv": "cpp",
"wmg_debug.h": "c",
"libretro.h": "c"
"dirent.h": "c"
},
}
15 changes: 0 additions & 15 deletions workspace/all/common/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ enum {
SDL_Surface* GFX_init(int mode);
#define GFX_resize PLAT_resizeVideo // (int w, int h, int pitch);
#define GFX_setScaleClip PLAT_setVideoScaleClip // (int x, int y, int width, int height)
#define GFX_setNearestNeighbor PLAT_setNearestNeighbor // (int enabled)
#define GFX_setSharpness PLAT_setSharpness // (int sharpness)
#define GFX_setEffectColor PLAT_setEffectColor // (int color)
#define GFX_setEffect PLAT_setEffect // (int effect)
Expand All @@ -230,15 +229,12 @@ SDL_Surface* GFX_init(int mode);
#define GFX_animateSurfaceOpacity PLAT_animateSurfaceOpacity //(SDL_Surface *inputSurface,int x, int y)
#define GFX_animateSurfaceOpacityAndScale PLAT_animateSurfaceOpacityAndScale //(SDL_Surface *inputSurface,int x, int y)
#define GFX_animateAndFadeSurface PLAT_animateAndFadeSurface //(SDL_Surface *inputSurface,int x, int y)
#define GFX_revealSurface PLAT_revealSurface //(SDL_Surface *inputSurface,int x, int y)
#define GFX_animateAndRevealSurfaces PLAT_animateAndRevealSurfaces
#define GFX_resetScrollText PLAT_resetScrollText
#define GFX_scrollTextTexture PLAT_scrollTextTexture
#define GFX_flipHidden PLAT_flipHidden //(void)
#define GFX_GPU_Flip PLAT_GPU_Flip//(void)
#define GFX_GL_Swap PLAT_GL_Swap //(void)
#define GFX_GL_screenCapture PLAT_GL_screenCapture //(void)
#define GFX_pixelscaler PLAT_pixelscaler //(void)

#define GFX_present PLAT_present //(SDL_Surface *inputSurface,int x, int y)
void GFX_setMode(int mode);
Expand Down Expand Up @@ -471,7 +467,6 @@ void PLAT_clearAll(void);
void PLAT_setVsync(int vsync);
SDL_Surface* PLAT_resizeVideo(int w, int h, int pitch);
void PLAT_setVideoScaleClip(int x, int y, int width, int height);
void PLAT_setNearestNeighbor(int enabled);
void PLAT_setSharpness(int sharpness);
void PLAT_setEffectColor(int color);
void PLAT_setEffect(int effect);
Expand Down Expand Up @@ -524,16 +519,6 @@ void PLAT_animateSurfaceOpacityAndScale(
int layer
);

void PLAT_revealSurface(
SDL_Surface *inputSurface,
int x, int y,
int w, int h,
int duration_ms,
const char* direction,
int opacity,
int layer
);

void PLAT_animateAndRevealSurfaces(
SDL_Surface* inputMoveSurface,
SDL_Surface* inputRevealSurface,
Expand Down
19 changes: 11 additions & 8 deletions workspace/all/minarch/minarch.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ static void Game_open(char* path) {
// extract zip file located at game.path to game.tmp_path
// game.tmp_path is temp dir generated by mkdtemp
LOG_info("Extracting zip file manually: %s\n", game.path);
extract_zip(extensions);
if(!extract_zip(extensions))
return;
}
else {
LOG_info("Core can handle zip file: %s\n", game.path);
Expand Down Expand Up @@ -278,8 +279,8 @@ int extract_zip(char** extensions)
if ((za = zip_open(game.path, 0, &ze)) == NULL) {
zip_error_t error;
zip_error_init_with_code(&error, ze);
LOG_error("can't open zip archive `%s': %s/n", game.path, zip_error_strerror(&error));
return 1;
LOG_error("can't open zip archive `%s': %s\n", game.path, zip_error_strerror(&error));
return 0;
}

// char tmp_template[MAX_PATH];
Expand Down Expand Up @@ -318,15 +319,15 @@ int extract_zip(char** extensions)
zf = zip_fopen_index(za, i, 0);
if (!zf) {
LOG_error( "zip_fopen_index failed\n");
return 1;
return 0;
}

sprintf(game.tmp_path, "%s/%s", tmp_dirname, basename((char*)sb.name));
fd = open(game.tmp_path, O_RDWR | O_TRUNC | O_CREAT, 0644);
if (fd < 0) {
LOG_error( "open failed\n");
zip_fclose(zf);
return 1;
return 0;
}
//LOG_info("Writing: %s\n", game.tmp_path);

Expand All @@ -337,22 +338,24 @@ int extract_zip(char** extensions)
LOG_error( "zip_fread failed\n");
close(fd);
zip_fclose(zf);
return 1;
return 0;
}
write(fd, buf, len);
sum += len;
}
close(fd);
zip_fclose(zf);
return 0;
return 1;
}
}
}

if (zip_close(za) == -1) {
LOG_error("can't close zip archive `%s'\n", game.path);
return 1;
return 0;
}

return 0;
}

///////////////////////////////////////
Expand Down
1 change: 1 addition & 0 deletions workspace/macos/platform/msettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

void InitSettings(void);
void QuitSettings(void);
int InitializedSettings(void);

int GetBrightness(void);
int GetColortemp(void);
Expand Down
Loading