diff --git a/Makefile.common b/Makefile.common index b1a0dbe006..7e2b31fb3c 100644 --- a/Makefile.common +++ b/Makefile.common @@ -794,9 +794,10 @@ endif ifeq ($(HAVE_RPNG), 1) OBJ += libretro-common/formats/png/rpng.o \ libretro-common/formats/png/rpng_encode.o +else + OBJ += libretro-common/formats/bmp/rbmp_encode.o endif -OBJ += libretro-common/formats/bmp/rbmp_encode.o \ - libretro-common/formats/tga/tga_decode.o +OBJ += libretro-common/formats/tga/tga_decode.o ifdef HAVE_COMPRESSION DEFINES += -DHAVE_COMPRESSION diff --git a/griffin/griffin.c b/griffin/griffin.c index a345da577c..437b062709 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -176,9 +176,9 @@ VIDEO IMAGE #ifdef HAVE_RPNG #include "../libretro-common/formats/png/rpng.c" #include "../libretro-common/formats/png/rpng_encode.c" -#endif - +#else #include "../libretro-common/formats/bmp/rbmp_encode.c" +#endif /*============================================================ VIDEO DRIVER diff --git a/screenshot.c b/screenshot.c index 205b39a556..7702759375 100644 --- a/screenshot.c +++ b/screenshot.c @@ -33,8 +33,11 @@ #if defined(HAVE_ZLIB_DEFLATE) && defined(HAVE_RPNG) #include -#endif +#define IMG_EXT "png" +#else #include +#define IMG_EXT "bmp" +#endif #include "general.h" #include "msg_hash.h" @@ -48,12 +51,6 @@ #include "config.h" #endif -#if defined(HAVE_ZLIB_DEFLATE) && defined(HAVE_RPNG) -#define IMG_EXT "png" -#else -#define IMG_EXT "bmp" -#endif - static bool take_screenshot_viewport(void) { char screenshot_path[PATH_MAX_LENGTH] = {0};