Add g_runloop.is_idle

This commit is contained in:
twinaphex 2015-03-08 01:48:40 +01:00
parent e37a4aa46e
commit 5b3ab881ba
2 changed files with 4 additions and 0 deletions

View File

@ -429,6 +429,7 @@ struct runloop
{ {
/* Lifecycle state checks. */ /* Lifecycle state checks. */
bool is_paused; bool is_paused;
bool is_idle;
bool is_menu; bool is_menu;
bool is_slowmotion; bool is_slowmotion;

View File

@ -571,6 +571,9 @@ static int do_state_checks(
retro_input_t input, retro_input_t old_input, retro_input_t input, retro_input_t old_input,
retro_input_t trigger_input) retro_input_t trigger_input)
{ {
if (g_runloop.is_idle)
return 1;
if (BIT64_GET(trigger_input, RARCH_SCREENSHOT)) if (BIT64_GET(trigger_input, RARCH_SCREENSHOT))
rarch_main_command(RARCH_CMD_TAKE_SCREENSHOT); rarch_main_command(RARCH_CMD_TAKE_SCREENSHOT);