From 5b3ab881ba2f0ac4d162148e603142cfbc9c957c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 8 Mar 2015 01:48:40 +0100 Subject: [PATCH] Add g_runloop.is_idle --- general.h | 1 + runloop.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/general.h b/general.h index 82f4b1431c..5635d52ad0 100644 --- a/general.h +++ b/general.h @@ -429,6 +429,7 @@ struct runloop { /* Lifecycle state checks. */ bool is_paused; + bool is_idle; bool is_menu; bool is_slowmotion; diff --git a/runloop.c b/runloop.c index 95467bde47..25e9d18f40 100644 --- a/runloop.c +++ b/runloop.c @@ -571,6 +571,9 @@ static int do_state_checks( retro_input_t input, retro_input_t old_input, retro_input_t trigger_input) { + if (g_runloop.is_idle) + return 1; + if (BIT64_GET(trigger_input, RARCH_SCREENSHOT)) rarch_main_command(RARCH_CMD_TAKE_SCREENSHOT);