mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Create RARCH_MAIN_CTL_CHECK_IDLE_STATE
This commit is contained in:
parent
7a831bcea6
commit
ec9ec9e079
25
runloop.c
25
runloop.c
@ -359,9 +359,22 @@ bool rarch_main_ctl(enum rarch_main_ctl_state state, void *data)
|
||||
strlcpy(global->path.fullpath, fullpath, sizeof(global->path.fullpath));
|
||||
}
|
||||
break;
|
||||
case RARCH_MAIN_CTL_CHECK_IDLE_STATE:
|
||||
{
|
||||
event_cmd_state_t *cmd = (event_cmd_state_t*)data;
|
||||
bool focused = check_focus(settings);
|
||||
|
||||
check_pause(settings, focused,
|
||||
cmd->pause_pressed, cmd->frameadvance_pressed);
|
||||
|
||||
if (!rarch_main_ctl(RARCH_MAIN_CTL_CHECK_PAUSE_STATE, cmd))
|
||||
return false;
|
||||
if (!focused)
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
case RARCH_MAIN_CTL_CHECK_STATE:
|
||||
{
|
||||
bool focused = false;
|
||||
event_cmd_state_t *cmd = (event_cmd_state_t*)data;
|
||||
|
||||
if (!cmd || main_is_idle)
|
||||
@ -392,15 +405,7 @@ bool rarch_main_ctl(enum rarch_main_ctl_state state, void *data)
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
focused = check_focus(settings);
|
||||
|
||||
check_pause(settings, focused,
|
||||
cmd->pause_pressed, cmd->frameadvance_pressed);
|
||||
|
||||
if (!rarch_main_ctl(RARCH_MAIN_CTL_CHECK_PAUSE_STATE, cmd))
|
||||
return false;
|
||||
if (!focused)
|
||||
if (!rarch_main_ctl(RARCH_MAIN_CTL_CHECK_IDLE_STATE, data))
|
||||
return false;
|
||||
|
||||
check_fast_forward_button(driver,
|
||||
|
Loading…
x
Reference in New Issue
Block a user