From e20e40ebc2f7d70a097f6a320581d5922cc5c0ca Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 22 Oct 2012 07:09:35 +0200 Subject: [PATCH] Since setting color format is a compile time option - ifdef it altogether for older frontends --- Makefile.libretro | 2 +- libretro/libretro.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.libretro b/Makefile.libretro index 87f9bcd..94bdbc9 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -157,7 +157,7 @@ CFLAGS += $(fpic) $(DEFINES) $(CODE_DEFINES) ifeq ($(FRONTEND_SUPPORTS_RGB565), 1) # if you have a new frontend that supports RGB565 -BPP_DEFINES = -DUSE_16BPP_RENDERING +BPP_DEFINES = -DUSE_16BPP_RENDERING -DFRONTEND_SUPPORTS_RGB565 else BPP_DEFINES = -DUSE_15BPP_RENDERING endif diff --git a/libretro/libretro.c b/libretro/libretro.c index 2c52a50..10a0080 100644 --- a/libretro/libretro.c +++ b/libretro/libretro.c @@ -975,11 +975,13 @@ void retro_init(void) level = 1; environ_cb(RETRO_ENVIRONMENT_SET_PERFORMANCE_LEVEL, &level); +#ifdef FRONTEND_SUPPORTS_RGB565 unsigned rgb565 = RETRO_PIXEL_FORMAT_RGB565; environ_cb(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &rgb565); if (rgb565) fprintf(stderr, "Frontend supports RGB565 - will use that instead of XRGB1555."); +#endif } void retro_deinit(void)