mirror of
https://github.com/libretro/yabause.git
synced 2024-11-23 08:59:50 +00:00
(libretro) fix pixel format on android
This commit is contained in:
parent
ce4d23fb24
commit
811f9e81db
@ -8,6 +8,7 @@ DYNAREC = 0
|
||||
HAVE_GRIFFIN = 0
|
||||
HAVE_THREADS = 1
|
||||
HAVE_MUSASHI = 1
|
||||
USE_RGB_565 = 1
|
||||
HAVE_UWP = 0
|
||||
HAVE_SYS_PARAM_H = 1
|
||||
HAVE_FSEEKO = 0
|
||||
@ -515,7 +516,7 @@ FLAGS += $(fpic)
|
||||
INCFLAGS := $(foreach dir,$(INCLUDE_DIRS),-I$(dir))
|
||||
|
||||
WARNINGS :=
|
||||
FLAGS += $(INCFLAGS) -D__LIBRETRO__ $(ENDIANNESS_DEFINES) -DSIZEOF_DOUBLE=8 $(WARNINGS) -DUSE_16BPP=1 -DUSE_RGB_565=1 \
|
||||
FLAGS += $(INCFLAGS) -D__LIBRETRO__ $(ENDIANNESS_DEFINES) -DSIZEOF_DOUBLE=8 $(WARNINGS) \
|
||||
-DNO_CLI -DHAVE_SYS_TIME_H -DHAVE_GETTIMEOFDAY -DHAVE_STDINT_H=1 -DVERSION=\"0.9.15\" \
|
||||
-DHAVE_LROUND -D_7ZIP_ST -DFLAC__HAS_OGG=0 -DFLAC__NO_DLL
|
||||
|
||||
|
@ -220,3 +220,9 @@ ifeq ($(HAVE_MUSASHI), 1)
|
||||
else
|
||||
OBJECTS_C += $(C68KEXEC_OBJECT)
|
||||
endif
|
||||
|
||||
ifeq ($(USE_RGB_565), 1)
|
||||
FLAGS += -DUSE_16BPP=1 -DUSE_RGB_565=1
|
||||
else
|
||||
FLAGS += -DUSE_16BPP=1 -DUSE_RGB_555=1
|
||||
endif
|
||||
|
@ -6,6 +6,7 @@ FLAGS :=
|
||||
DYNAREC := 0
|
||||
HAVE_THREADS := 1
|
||||
HAVE_MUSASHI := 1
|
||||
USE_RGB_565 := 1
|
||||
# The following is broken upstream ?
|
||||
USE_PLAY_JIT := 0
|
||||
USE_SCSP2 := 0
|
||||
|
@ -994,12 +994,6 @@ void retro_init(void)
|
||||
if (environ_cb(RETRO_ENVIRONMENT_GET_PERF_INTERFACE, &perf_cb))
|
||||
perf_get_cpu_features_cb = perf_cb.get_cpu_features;
|
||||
|
||||
#if 1
|
||||
enum retro_pixel_format rgb565 = RETRO_PIXEL_FORMAT_RGB565;
|
||||
if(environ_cb(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &rgb565))
|
||||
log_cb(RETRO_LOG_INFO, "Frontend supports RGB565 - will use that instead of XRGB1555.\n");
|
||||
#endif
|
||||
|
||||
if (environ_cb(RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY, &dir) && dir)
|
||||
{
|
||||
strncpy(g_system_dir, dir, sizeof(g_system_dir));
|
||||
@ -1027,6 +1021,14 @@ bool retro_load_game(const struct retro_game_info *info)
|
||||
if (!info)
|
||||
return false;
|
||||
|
||||
#ifdef USE_RGB_565
|
||||
enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_RGB565;
|
||||
#else
|
||||
enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_0RGB1555;
|
||||
#endif
|
||||
if (!environ_cb(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &fmt))
|
||||
return false;
|
||||
|
||||
check_variables();
|
||||
|
||||
snprintf(bios_path, sizeof(bios_path), "%s%csaturn_bios.bin", g_system_dir, slash);
|
||||
|
Loading…
Reference in New Issue
Block a user