diff --git a/components/retro-go/config.h b/components/retro-go/config.h index 328ecf11..a837e4b4 100644 --- a/components/retro-go/config.h +++ b/components/retro-go/config.h @@ -135,10 +135,8 @@ #endif #endif -#ifdef ESP_PLATFORM +#ifndef RG_ZIP_SUPPORT #define RG_ZIP_SUPPORT 1 -#else -#define RG_ZIP_SUPPORT 0 #endif #ifndef RG_SCREEN_PARTIAL_UPDATES diff --git a/components/retro-go/rg_storage.c b/components/retro-go/rg_storage.c index ab6355f3..c36806c9 100644 --- a/components/retro-go/rg_storage.c +++ b/components/retro-go/rg_storage.c @@ -506,7 +506,11 @@ bool rg_storage_write_file(const char *path, const void *data_ptr, size_t data_l * to do some testing to determine if the increased executable size is acceptable... */ #if RG_ZIP_SUPPORT + +#ifdef ESP_PLATFORM #include +#else +#include #endif #define ZIP_MAGIC 0x04034b50 @@ -530,7 +534,6 @@ typedef struct __attribute__((packed)) bool rg_storage_unzip_file(const char *zip_path, const char *filter, void **data_out, size_t *data_len, uint32_t flags) { -#if RG_ZIP_SUPPORT RG_ASSERT_ARG(data_out && data_len); CHECK_PATH(zip_path); @@ -636,8 +639,11 @@ bool rg_storage_unzip_file(const char *zip_path, const char *filter, void **data free(decomp); fclose(fp); return false; +} #else +bool rg_storage_unzip_file(const char *zip_path, const char *filter, void **data_out, size_t *data_len, uint32_t flags) +{ RG_LOGE("ZIP support hasn't been enabled!"); return false; -#endif } +#endif diff --git a/components/retro-go/rg_surface.c b/components/retro-go/rg_surface.c index 2e034738..4343ffa9 100644 --- a/components/retro-go/rg_surface.c +++ b/components/retro-go/rg_surface.c @@ -1,7 +1,7 @@ #include "rg_system.h" #include "rg_surface.h" -#include "lodepng.h" +#include #include #include diff --git a/tools/build_sdl2.sh b/tools/build_sdl2.sh index fc2821a5..af2a44c3 100644 --- a/tools/build_sdl2.sh +++ b/tools/build_sdl2.sh @@ -6,9 +6,9 @@ CC="gcc" # BUILD_INFO="RG:$(git describe) / SDL:$(sdl2-config --version)" CFLAGS="-no-pie -DRG_TARGET_SDL2 -DRETRO_GO -DCJSON_HIDE_SYMBOLS -DSDL_MAIN_HANDLED=1 -DRG_BUILD_INFO=\"SDL2\" -Dapp_main=SDL_Main $(sdl2-config --cflags)" -INCLUDES="-Icomponents/retro-go -Icomponents/retro-go/libs/cJSON -Icomponents/retro-go/libs/lodepng" +INCLUDES="-Icomponents/retro-go -Icomponents/retro-go/libs/cJSON -Icomponents/retro-go/libs/lodepng -Icomponents/retro-go/libs/miniz" SRCFILES="components/retro-go/*.c components/retro-go/drivers/audio/*.c components/retro-go/fonts/*.c - components/retro-go/libs/cJSON/*.c components/retro-go/libs/lodepng/*.c" + components/retro-go/libs/cJSON/*.c components/retro-go/libs/lodepng/*.c components/retro-go/libs/miniz/*.c" LIBS="$(sdl2-config --libs) -lstdc++" echo "Cleaning..."