Create video_driver_has_focus
This commit is contained in:
parent
81ca20c9b5
commit
820595379e
|
@ -243,6 +243,15 @@ bool video_driver_is_alive(void)
|
||||||
return true;
|
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)
|
static void deinit_video_filter(void)
|
||||||
{
|
{
|
||||||
rarch_softfilter_free(g_extern.filter.filter);
|
rarch_softfilter_free(g_extern.filter.filter);
|
||||||
|
|
|
@ -246,6 +246,8 @@ void video_driver_make_current_context(void);
|
||||||
|
|
||||||
bool video_driver_is_alive(void);
|
bool video_driver_is_alive(void);
|
||||||
|
|
||||||
|
bool video_driver_has_focus(void);
|
||||||
|
|
||||||
void uninit_video_input(void);
|
void uninit_video_input(void);
|
||||||
|
|
||||||
void init_video(void);
|
void init_video(void);
|
||||||
|
|
|
@ -91,7 +91,7 @@ static bool check_pause(bool pressed, bool frameadvance_pressed)
|
||||||
pressed |= !g_extern.is_paused && frameadvance_pressed;
|
pressed |= !g_extern.is_paused && frameadvance_pressed;
|
||||||
|
|
||||||
if (g_settings.pause_nonactive)
|
if (g_settings.pause_nonactive)
|
||||||
focus = driver.video->focus(driver.video_data);
|
focus = video_driver_has_focus();
|
||||||
|
|
||||||
if (focus && pressed)
|
if (focus && pressed)
|
||||||
cmd = RARCH_CMD_PAUSE_TOGGLE;
|
cmd = RARCH_CMD_PAUSE_TOGGLE;
|
||||||
|
|
Loading…
Reference in New Issue