From 4aa262b1edc4ef0fdf02d377bf1af72ffb3c2cd9 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 18 Mar 2015 20:48:17 +0100 Subject: [PATCH] Create rarch_main_is_idle --- runloop.c | 5 +++++ runloop.h | 2 ++ runloop_data.c | 3 +-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/runloop.c b/runloop.c index 45c262c60d..47b7436c52 100644 --- a/runloop.c +++ b/runloop.c @@ -944,6 +944,11 @@ void rarch_main_clear_state(void) memset(&g_runloop, 0, sizeof(g_runloop)); } +bool rarch_main_is_idle(void) +{ + return g_runloop.is_idle; +} + /** * rarch_main_iterate: * diff --git a/runloop.h b/runloop.h index f43cf5cb25..9dd62d9481 100644 --- a/runloop.h +++ b/runloop.h @@ -135,6 +135,8 @@ void rarch_main_data_msg_queue_push(unsigned type, void rarch_main_clear_state(void); +bool rarch_main_is_idle(void); + void rarch_main_data_clear_state(void); void rarch_main_data_iterate(void); diff --git a/runloop_data.c b/runloop_data.c index 304a962264..fa457bcb6b 100644 --- a/runloop_data.c +++ b/runloop_data.c @@ -688,10 +688,9 @@ static void rarch_main_data_db_iterate(void) #ifdef HAVE_OVERLAY static void rarch_main_data_overlay_iterate(void) { - runloop_t *runloop = rarch_main_get_ptr(); driver_t *driver = driver_get_ptr(); - if (runloop->is_idle) + if (rarch_main_is_idle()) return; if (!driver->overlay) return;