diff --git a/gfx/video_driver.c b/gfx/video_driver.c index c1fe7845d5..5a0f15622b 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -243,6 +243,15 @@ bool video_driver_is_alive(void) return true; } +bool video_driver_has_focus(void) +{ + if (!driver.video || !driver.video_data) + return false; + if (!driver.video->focus(driver.video_data)) + return false; + return true; +} + static void deinit_video_filter(void) { rarch_softfilter_free(g_extern.filter.filter); diff --git a/gfx/video_driver.h b/gfx/video_driver.h index acafb73024..bb754d9502 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -246,6 +246,8 @@ void video_driver_make_current_context(void); bool video_driver_is_alive(void); +bool video_driver_has_focus(void); + void uninit_video_input(void); void init_video(void); diff --git a/runloop.c b/runloop.c index 5247e4d262..33cb4c30e9 100644 --- a/runloop.c +++ b/runloop.c @@ -91,7 +91,7 @@ static bool check_pause(bool pressed, bool frameadvance_pressed) pressed |= !g_extern.is_paused && frameadvance_pressed; if (g_settings.pause_nonactive) - focus = driver.video->focus(driver.video_data); + focus = video_driver_has_focus(); if (focus && pressed) cmd = RARCH_CMD_PAUSE_TOGGLE;