From 211381bb89cebe20c3304fbe9df2e19006e6afc1 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Wed, 15 Aug 2012 09:44:17 +0200 Subject: [PATCH] (Libretro) Add nonblock_state --- driver.c | 6 +++++- libretro.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/driver.c b/driver.c index 654b5c4541..6e40f87e25 100644 --- a/driver.c +++ b/driver.c @@ -209,7 +209,11 @@ static void adjust_system_rates(void) g_settings.video.vsync = false; RARCH_LOG("Game FPS > Monitor FPS. Cannot rely on VSync.\n"); #ifdef RARCH_CONSOLE - video_set_nonblock_state_func(true); + struct retro_system_info info; + retro_get_system_info(&info); + + if(info.nonblock_state) + video_set_nonblock_state_func(true); #endif } diff --git a/libretro.h b/libretro.h index 301f78e9e0..00697f5bcc 100755 --- a/libretro.h +++ b/libretro.h @@ -383,6 +383,8 @@ struct retro_system_info // If false, ::data and ::size are guaranteed to be valid, but ::path might not be valid. // This is typically set to true for libretro implementations that must load from file. // Implementations should strive for setting this to false, as it allows the frontend to perform patching, etc. + bool nonblock_state; // If true, this indicates that the game's fps is above 60 and that vsync should + // be deactivated before startup bool block_extract; // If true, the frontend is not allowed to extract any archives before loading the real ROM. // Necessary for certain libretro implementations that load games from zipped archives.