From 20e8186be8f7e332f216f5ab0fb97d5843176fac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Sat, 12 Oct 2024 22:50:37 +0800 Subject: [PATCH] libretro: Fix no game loading. --- desktop_version/libretro/libretro.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/desktop_version/libretro/libretro.c b/desktop_version/libretro/libretro.c index 14c74537..59224e0b 100644 --- a/desktop_version/libretro/libretro.c +++ b/desktop_version/libretro/libretro.c @@ -35,10 +35,13 @@ void retro_set_environment(retro_environment_t cb) { static struct retro_log_callback log; + bool no_game = true; environ_cb = cb; if (environ_cb(RETRO_ENVIRONMENT_GET_LOG_INTERFACE, &log)) log_cb = log.log; + + environ_cb(RETRO_ENVIRONMENT_SET_SUPPORT_NO_GAME, &no_game); } void @@ -97,10 +100,8 @@ retro_get_system_av_info(struct retro_system_av_info* info) void retro_init(void) { - bool yes = true; enum retro_pixel_format pixfmt = RETRO_PIXEL_FORMAT_XRGB8888; environ_cb(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &pixfmt); - environ_cb(RETRO_ENVIRONMENT_SET_SUPPORT_NO_GAME, &yes); }