Create rarch_main_is_idle

This commit is contained in:
twinaphex 2015-03-18 20:48:17 +01:00
parent aa8e5bc8cf
commit 4aa262b1ed
3 changed files with 8 additions and 2 deletions

View File

@ -944,6 +944,11 @@ void rarch_main_clear_state(void)
memset(&g_runloop, 0, sizeof(g_runloop)); memset(&g_runloop, 0, sizeof(g_runloop));
} }
bool rarch_main_is_idle(void)
{
return g_runloop.is_idle;
}
/** /**
* rarch_main_iterate: * rarch_main_iterate:
* *

View File

@ -135,6 +135,8 @@ void rarch_main_data_msg_queue_push(unsigned type,
void rarch_main_clear_state(void); void rarch_main_clear_state(void);
bool rarch_main_is_idle(void);
void rarch_main_data_clear_state(void); void rarch_main_data_clear_state(void);
void rarch_main_data_iterate(void); void rarch_main_data_iterate(void);

View File

@ -688,10 +688,9 @@ static void rarch_main_data_db_iterate(void)
#ifdef HAVE_OVERLAY #ifdef HAVE_OVERLAY
static void rarch_main_data_overlay_iterate(void) static void rarch_main_data_overlay_iterate(void)
{ {
runloop_t *runloop = rarch_main_get_ptr();
driver_t *driver = driver_get_ptr(); driver_t *driver = driver_get_ptr();
if (runloop->is_idle) if (rarch_main_is_idle())
return; return;
if (!driver->overlay) if (!driver->overlay)
return; return;