From 4e5bf65e23e973533f550d8d5be44ac0a301a6f8 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 19 Apr 2015 16:55:03 +0200 Subject: [PATCH] Create HAVE_RPNG define --- Makefile.common | 18 ++++++++++++----- Makefile.ctr | 2 +- Makefile.griffin | 6 ++++++ Makefile.ps3 | 2 +- Makefile.ps3.cobra | 2 +- Makefile.psl1ght | 2 +- Makefile.psp1 | 2 +- android/phoenix/jni/Android.mk | 2 +- .../RetroArch_OSX.xcodeproj/project.pbxproj | 2 ++ apple/RetroArch_OSX.xcodeproj/project.pbxproj | 2 ++ .../RetroArch_iOS.xcodeproj/project.pbxproj | 8 ++++++++ gfx/image/image.c | 10 +++++++--- griffin/griffin.c | 3 +++ runloop_data.c | 20 +++++++++++++++++-- screenshot.c | 5 ++--- 15 files changed, 67 insertions(+), 19 deletions(-) diff --git a/Makefile.common b/Makefile.common index b37781d733..a98648e5a7 100644 --- a/Makefile.common +++ b/Makefile.common @@ -643,13 +643,10 @@ endif ifeq ($(HAVE_ZLIB), 1) ZLIB_OBJS = decompress/zip_support.o - OBJ += libretro-common/formats/png/rpng_nbio.o \ - libretro-common/formats/png/rpng_fbio.o \ - libretro-common/formats/png/rpng_decode.o \ - libretro-common/formats/png/rpng_encode.o \ - libretro-common/file/file_extract.o + OBJ += libretro-common/file/file_extract.o OBJ += $(ZLIB_OBJS) DEFINES += -DHAVE_ZLIB + #HAVE_RPNG = 1 HAVE_COMPRESSION = 1 ifeq ($(WANT_ZLIB), 1) DEFINES += -DWANT_ZLIB @@ -659,6 +656,17 @@ ifeq ($(HAVE_ZLIB), 1) endif endif +ifdef HAVE_RPNG + DEFINES += -DHAVE_RPNG +endif + +ifeq ($(HAVE_RPNG), 1) + OBJ += libretro-common/formats/png/rpng_nbio.o \ + libretro-common/formats/png/rpng_fbio.o \ + libretro-common/formats/png/rpng_decode.o \ + libretro-common/formats/png/rpng_encode.o +endif + ifdef HAVE_COMPRESSION DEFINES += -DHAVE_COMPRESSION endif diff --git a/Makefile.ctr b/Makefile.ctr index b54c29d1e6..44cb99611f 100644 --- a/Makefile.ctr +++ b/Makefile.ctr @@ -39,7 +39,7 @@ CFLAGS += -I. -Ideps/zlib -Ideps/7zip -Ilibretro-common/include CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE -DSINC_LOWEST_QUALITY CFLAGS += -DHAVE_GRIFFIN=1 -DHAVE_FILTERS_BUILTIN -DHAVE_MENU -DHAVE_RGUI -CFLAGS += -DHAVE_ZLIB -DWANT_ZLIB -DHAVE_BUILTIN_AUTOCONFIG +CFLAGS += -DHAVE_ZLIB -DHAVE_RPNG -DWANT_ZLIB -DHAVE_BUILTIN_AUTOCONFIG #-DHAVE_LIBRETRO_MANAGEMENT -DWANT_RPNG -DHAVE_7ZIP diff --git a/Makefile.griffin b/Makefile.griffin index 25543252c3..f893cd9350 100644 --- a/Makefile.griffin +++ b/Makefile.griffin @@ -76,6 +76,7 @@ endif HAVE_FILTERS_BUILTIN := 1 HAVE_THREADS := 1 HAVE_ZLIB := 1 + HAVE_RPNG := 1 HAVE_7ZIP := 1 HAVE_RPNG := 1 HAVE_OVERLAY := 1 @@ -119,6 +120,7 @@ HAVE_7ZIP := 1 HAVE_LIBRETRO_MANAGEMENT := 1 HAVE_ZLIB := 1 HAVE_RPNG := 1 + HAVE_RPNG := 1 HAVE_OVERLAY := 1 HAVE_LIBSICKSAXIS := 0 HAVE_BUILTIN_AUTOCONFIG := 1 @@ -172,6 +174,10 @@ ifeq ($(HAVE_ZLIB), 1) CFLAGS += -DHAVE_ZLIB -DWANT_ZLIB endif +ifeq ($(HAVE_RPNG), 1) +CFLAGS += -DHAVE_RPNG +endif + ifeq ($(HAVE_7ZIP), 1) CFLAGS += -DHAVE_7ZIP endif diff --git a/Makefile.ps3 b/Makefile.ps3 index 47d2186b4f..5cfe5a2773 100644 --- a/Makefile.ps3 +++ b/Makefile.ps3 @@ -106,7 +106,7 @@ PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -l PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe -DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FBO -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_7Z -DWANT_ZLIB -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN -DHAVE_BUILTIN_AUTOCONFIG +DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FBO -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_7Z -DWANT_ZLIB -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN -DHAVE_BUILTIN_AUTOCONFIG ifeq ($(DEBUG), 1) PPU_OPTIMIZE_LV := -O0 -g diff --git a/Makefile.ps3.cobra b/Makefile.ps3.cobra index 1d708570c2..c542425989 100644 --- a/Makefile.ps3.cobra +++ b/Makefile.ps3.cobra @@ -106,7 +106,7 @@ PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -l PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe -DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FBO -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -DWANT_ZLIB -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=0 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) +DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FBO -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DWANT_ZLIB -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=0 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) ifeq ($(DEBUG), 1) PPU_OPTIMIZE_LV := -O0 -g diff --git a/Makefile.psl1ght b/Makefile.psl1ght index 88db64d0d7..85ddec7938 100644 --- a/Makefile.psl1ght +++ b/Makefile.psl1ght @@ -90,7 +90,7 @@ ifeq ($(HAVE_FILE_LOGGER), 1) CFLAGS += -DHAVE_FILE_LOGGER endif -SHARED_FLAGS := -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_GCMGL -DHAVE_FBO -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_MOUSE -DHAVE_ZLIB -DWANT_ZLIB -DHAVE_GRIFFIN=1 -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -Wno-char-subscripts +SHARED_FLAGS := -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_GCMGL -DHAVE_FBO -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_MOUSE -DHAVE_ZLIB -DHAVE_RPNG -DWANT_ZLIB -DHAVE_GRIFFIN=1 -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -Wno-char-subscripts CFLAGS += -std=gnu99 $(SHARED_FLAGS) CXXFLAGS += $(SHARED_FLAGS) diff --git a/Makefile.psp1 b/Makefile.psp1 index 2b7491db07..d4d43ebafa 100644 --- a/Makefile.psp1 +++ b/Makefile.psp1 @@ -23,7 +23,7 @@ INCDIR = deps/zlib deps/7zip libretro-common/include CFLAGS = $(OPTIMIZE_LV) -G0 -std=gnu99 -ffast-math ASFLAGS = $(CFLAGS) -RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_ZLIB -DWANT_ZLIB -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DWANT_RPNG -DSINC_LOWEST_QUALITY -DHAVE_BUILTIN_AUTOCONFIG -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP +RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_ZLIB -DHAVE_RPNG -DWANT_ZLIB -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DWANT_RPNG -DSINC_LOWEST_QUALITY -DHAVE_BUILTIN_AUTOCONFIG -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP LIBDIR = LDFLAGS = diff --git a/android/phoenix/jni/Android.mk b/android/phoenix/jni/Android.mk index 757d41bc1b..c73f73f532 100644 --- a/android/phoenix/jni/Android.mk +++ b/android/phoenix/jni/Android.mk @@ -58,7 +58,7 @@ else endif -LOCAL_CFLAGS += -Wall -pthread -Wno-unused-function -fno-stack-protector -funroll-loops -DRARCH_MOBILE -DHAVE_GRIFFIN -DANDROID -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_FBO -DHAVE_OVERLAY -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DGLSL_DEBUG -DHAVE_DYLIB -DHAVE_GLSL -DHAVE_MENU -DHAVE_RGUI -DHAVE_ZLIB -DINLINE=inline -DLSB_FIRST -DHAVE_THREADS -D__LIBRETRO__ -DHAVE_RSOUND -DHAVE_NETPLAY -DHAVE_NETWORKING -DRARCH_INTERNAL -DHAVE_FILTERS_BUILTIN -DHAVE_GLUI -DHAVE_XMB -std=gnu99 -DHAVE_LIBRETRODB +LOCAL_CFLAGS += -Wall -pthread -Wno-unused-function -fno-stack-protector -funroll-loops -DRARCH_MOBILE -DHAVE_GRIFFIN -DANDROID -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_FBO -DHAVE_OVERLAY -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DGLSL_DEBUG -DHAVE_DYLIB -DHAVE_GLSL -DHAVE_MENU -DHAVE_RGUI -DHAVE_ZLIB -DHAVE_RPNG -DINLINE=inline -DLSB_FIRST -DHAVE_THREADS -D__LIBRETRO__ -DHAVE_RSOUND -DHAVE_NETPLAY -DHAVE_NETWORKING -DRARCH_INTERNAL -DHAVE_FILTERS_BUILTIN -DHAVE_GLUI -DHAVE_XMB -std=gnu99 -DHAVE_LIBRETRODB LOCAL_CFLAGS += -DHAVE_7ZIP ifeq ($(NDK_DEBUG),1) diff --git a/apple/OSXPPC/RetroArch_OSX.xcodeproj/project.pbxproj b/apple/OSXPPC/RetroArch_OSX.xcodeproj/project.pbxproj index 8b646d7d71..a5d901bac6 100644 --- a/apple/OSXPPC/RetroArch_OSX.xcodeproj/project.pbxproj +++ b/apple/OSXPPC/RetroArch_OSX.xcodeproj/project.pbxproj @@ -298,6 +298,7 @@ "-DHAVE_DYNAMIC", "-DHAVE_OVERLAY", "-DHAVE_ZLIB", + "-DHAVE_RPNG", "-DHAVE_COCOA", "-DWANT_ZLIB", "-DSINC_LOWER_QUALITY", @@ -361,6 +362,7 @@ "-DHAVE_DYNAMIC", "-DHAVE_OVERLAY", "-DHAVE_ZLIB", + "-DHAVE_RPNG", "-DHAVE_COCOA", "-DWANT_ZLIB", "-DSINC_LOWER_QUALITY", diff --git a/apple/RetroArch_OSX.xcodeproj/project.pbxproj b/apple/RetroArch_OSX.xcodeproj/project.pbxproj index 4e704cc107..8aeb1f9a3f 100644 --- a/apple/RetroArch_OSX.xcodeproj/project.pbxproj +++ b/apple/RetroArch_OSX.xcodeproj/project.pbxproj @@ -341,6 +341,7 @@ "-DHAVE_DYNAMIC", "-DHAVE_OVERLAY", "-DHAVE_ZLIB", + "-DHAVE_RPNG", "-DHAVE_COCOA", "-DWANT_ZLIB", "-DSINC_LOWER_QUALITY", @@ -397,6 +398,7 @@ "-DHAVE_DYNAMIC", "-DHAVE_OVERLAY", "-DHAVE_ZLIB", + "-DHAVE_RPNG", "-DHAVE_COCOA", "-DWANT_ZLIB", "-DSINC_LOWER_QUALITY", diff --git a/apple/iOS/RetroArch_iOS.xcodeproj/project.pbxproj b/apple/iOS/RetroArch_iOS.xcodeproj/project.pbxproj index 7c64d2a5c5..ea3673caa0 100644 --- a/apple/iOS/RetroArch_iOS.xcodeproj/project.pbxproj +++ b/apple/iOS/RetroArch_iOS.xcodeproj/project.pbxproj @@ -513,6 +513,7 @@ "-DHAVE_DYNAMIC", "-DHAVE_OVERLAY", "-DHAVE_ZLIB", + "-DHAVE_RPNG", "-DHAVE_COCOATOUCH", "-DWANT_ZLIB", "-DSINC_LOWER_QUALITY", @@ -577,6 +578,7 @@ "-DHAVE_DYNAMIC", "-DHAVE_OVERLAY", "-DHAVE_ZLIB", + "-DHAVE_RPNG", "-DHAVE_COCOATOUCH", "-DWANT_ZLIB", "-DSINC_LOWER_QUALITY", @@ -615,6 +617,7 @@ "-DRARCH_INTERNAL", "-DHAVE_OVERLAY", "-DHAVE_ZLIB", + "-DHAVE_RPNG", "-DHAVE_COCOATOUCH", "-DWANT_ZLIB", "-DSINC_LOWER_QUALITY", @@ -685,6 +688,7 @@ "-DHAVE_FBO", "-DHAVE_OVERLAY", "-DHAVE_ZLIB", + "-DHAVE_RPNG", "-DHAVE_COCOATOUCH", "-DWANT_ZLIB", "-DSINC_LOWER_QUALITY", @@ -744,6 +748,7 @@ "-DHAVE_FBO", "-DHAVE_OVERLAY", "-DHAVE_ZLIB", + "-DHAVE_RPNG", "-DHAVE_COCOATOUCH", "-DWANT_ZLIB", "-DSINC_LOWER_QUALITY", @@ -802,6 +807,7 @@ "-DHAVE_DYNAMIC", "-DHAVE_OVERLAY", "-DHAVE_ZLIB", + "-DHAVE_RPNG", "-DHAVE_COCOATOUCH", "-DWANT_ZLIB", "-DSINC_LOWER_QUALITY", @@ -867,6 +873,7 @@ "-DHAVE_DYNAMIC", "-DHAVE_OVERLAY", "-DHAVE_ZLIB", + "-DHAVE_RPNG", "-DHAVE_COCOATOUCH", "-DWANT_ZLIB", "-DSINC_LOWER_QUALITY", @@ -906,6 +913,7 @@ "-DRARCH_INTERNAL", "-DHAVE_OVERLAY", "-DHAVE_ZLIB", + "-DHAVE_RPNG", "-DHAVE_COCOATOUCH", "-DWANT_ZLIB", "-DSINC_LOWER_QUALITY", diff --git a/gfx/image/image.c b/gfx/image/image.c index 18b9402122..08b2ad9cb3 100644 --- a/gfx/image/image.c +++ b/gfx/image/image.c @@ -19,7 +19,9 @@ #endif #include +#ifdef HAVE_RPNG #include +#endif #include #ifdef _XBOX1 #include "../d3d/d3d_wrapper.h" @@ -46,7 +48,7 @@ #endif -#ifdef HAVE_ZLIB +#ifdef HAVE_RPNG static bool rpng_image_load_argb_shift(const char *path, struct texture_image *out_img, unsigned a_shift, unsigned r_shift, @@ -397,13 +399,12 @@ bool texture_image_load(struct texture_image *out_img, const char *path) if (buf) free(buf); } -#ifdef HAVE_ZLIB +#ifdef HAVE_RPNG else if (strstr(path, ".png")) { ret = rpng_image_load_argb_shift(path, out_img, a_shift, r_shift, g_shift, b_shift); } -#endif #ifdef GEKKO if (ret) @@ -416,6 +417,9 @@ bool texture_image_load(struct texture_image *out_img, const char *path) } #endif +#endif + + return ret; } #endif diff --git a/griffin/griffin.c b/griffin/griffin.c index 0382f75b55..1fd9f15096 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -173,10 +173,13 @@ VIDEO IMAGE #include "../gfx/video_texture.c" #include "../libretro-common/formats/tga/tga_decode.c" + +#ifdef HAVE_RPNG #include "../libretro-common/formats/png/rpng_fbio.c" #include "../libretro-common/formats/png/rpng_nbio.c" #include "../libretro-common/formats/png/rpng_decode.c" #include "../libretro-common/formats/png/rpng_encode.c" +#endif /*============================================================ VIDEO DRIVER diff --git a/runloop_data.c b/runloop_data.c index 23b3275ad7..8ca11842ea 100644 --- a/runloop_data.c +++ b/runloop_data.c @@ -59,7 +59,9 @@ typedef struct nbio_image_handle bool is_blocking_on_processing; bool is_finished; transfer_cb_t cb; +#ifdef HAVE_RPNG struct rpng_t *handle; +#endif unsigned processing_pos_increment; unsigned pos_increment; uint64_t frame_count; @@ -301,6 +303,8 @@ static int rarch_main_data_http_iterate_poll(http_handle_t *http) #endif #ifdef HAVE_MENU + +#ifdef HAVE_RPNG static int cb_image_menu_wallpaper_upload(void *data, size_t len) { nbio_handle_t *nbio = (nbio_handle_t*)data; @@ -395,7 +399,6 @@ static int cb_nbio_image_menu_wallpaper(void *data, size_t len) return 0; } -#endif static int rarch_main_data_image_iterate_poll(nbio_handle_t *nbio) { @@ -511,6 +514,9 @@ static int rarch_main_data_image_iterate_transfer_parse(nbio_handle_t *nbio) return 0; } +#endif + +#endif static int cb_nbio_default(void *data, size_t len) { @@ -569,7 +575,7 @@ static int rarch_main_data_nbio_iterate_poll(nbio_handle_t *nbio) if (elem1[0] != '\0') { -#ifdef HAVE_MENU +#if defined(HAVE_MENU) && defined(HAVE_RPNG) if (!strcmp(elem1, "cb_menu_wallpaper")) nbio->cb = &cb_nbio_image_menu_wallpaper; #endif @@ -648,6 +654,7 @@ static int rarch_main_data_nbio_iterate_parse(nbio_handle_t *nbio) #ifdef HAVE_LIBRETRODB #ifdef HAVE_MENU + static void rarch_main_data_db_iterate(bool is_thread, data_runloop_t *runloop) { @@ -670,10 +677,12 @@ static void rarch_main_data_db_iterate(bool is_thread, break; } } + #endif #endif +#ifdef HAVE_RPNG static void rarch_main_data_nbio_image_iterate(bool is_thread, data_runloop_t *runloop) { @@ -708,6 +717,7 @@ static void rarch_main_data_nbio_image_iterate(bool is_thread, break; } } +#endif static void rarch_main_data_nbio_iterate(bool is_thread, data_runloop_t *runloop) { @@ -893,7 +903,9 @@ void rarch_main_data_free(void) static void data_runloop_iterate(bool is_thread, data_runloop_t *runloop) { rarch_main_data_nbio_iterate (is_thread, runloop); +#ifdef HAVE_RPNG rarch_main_data_nbio_image_iterate (is_thread, runloop); +#endif #ifdef HAVE_OVERLAY rarch_main_data_overlay_iterate (is_thread, runloop); #endif @@ -970,6 +982,7 @@ error: } #endif +#ifdef HAVE_RPNG static void rarch_main_data_nbio_image_upload_iterate(bool is_thread, data_runloop_t *runloop) { @@ -994,6 +1007,7 @@ static void rarch_main_data_nbio_image_upload_iterate(bool is_thread, break; } } +#endif void rarch_main_data_iterate(void) { @@ -1019,7 +1033,9 @@ void rarch_main_data_iterate(void) #ifdef HAVE_OVERLAY rarch_main_data_overlay_image_upload_iterate(false, runloop); #endif +#ifdef HAVE_RPNG rarch_main_data_nbio_image_upload_iterate(false, runloop); +#endif if (data_runloop_msg[0] != '\0') { diff --git a/screenshot.c b/screenshot.c index cc2b7315cc..4ad81d25be 100644 --- a/screenshot.c +++ b/screenshot.c @@ -41,8 +41,7 @@ #include #endif -#ifdef HAVE_ZLIB_DEFLATE - +#if defined(HAVE_ZLIB_DEFLATE) && defined(HAVE_RPNG) #include #define IMG_EXT "png" @@ -379,7 +378,7 @@ bool screenshot_dump(const char *folder, const void *frame, } ret = false; -#elif defined(HAVE_ZLIB_DEFLATE) +#elif defined(HAVE_ZLIB_DEFLATE) && defined(HAVE_RPNG) out_buffer = (uint8_t*)malloc(width * height * 3); if (!out_buffer) return false;