(runloop_data.c) Move rarch_main_iterate_overlay_state to runloop_data.c

This commit is contained in:
twinaphex 2015-03-15 01:39:43 +01:00
parent cea8f0cbe0
commit 4a68e58b8c
2 changed files with 35 additions and 33 deletions

View File

@ -876,36 +876,6 @@ static int rarch_main_iterate_quit(void)
}
#ifdef HAVE_OVERLAY
void rarch_main_iterate_overlay_state(void)
{
if (g_runloop.is_idle)
return;
switch (driver.overlay->state)
{
case OVERLAY_STATUS_NONE:
case OVERLAY_STATUS_ALIVE:
break;
case OVERLAY_STATUS_DEFERRED_LOAD:
input_overlay_load_overlays(driver.overlay);
break;
case OVERLAY_STATUS_DEFERRED_LOADING:
input_overlay_load_overlays_iterate(driver.overlay);
break;
case OVERLAY_STATUS_DEFERRED_LOADING_RESOLVE:
input_overlay_load_overlays_resolve_iterate(driver.overlay);
break;
case OVERLAY_STATUS_DEFERRED_DONE:
input_overlay_new_done(driver.overlay);
break;
case OVERLAY_STATUS_DEFERRED_ERROR:
input_overlay_free(driver.overlay);
break;
default:
break;
}
}
static void rarch_main_iterate_linefeed_overlay(void)
{
static char prev_overlay_restore = false;
@ -965,9 +935,6 @@ int rarch_main_iterate(void)
#ifdef HAVE_OVERLAY
rarch_main_iterate_linefeed_overlay();
if (driver.overlay)
rarch_main_iterate_overlay_state();
#endif
rarch_main_data_iterate();

View File

@ -609,8 +609,43 @@ static void rarch_main_data_db_iterate(void)
#endif
}
static void rarch_main_data_overlay_iterate(void)
{
if (g_runloop.is_idle)
return;
if (!driver.overlay)
return;
switch (driver.overlay->state)
{
case OVERLAY_STATUS_NONE:
case OVERLAY_STATUS_ALIVE:
break;
case OVERLAY_STATUS_DEFERRED_LOAD:
input_overlay_load_overlays(driver.overlay);
break;
case OVERLAY_STATUS_DEFERRED_LOADING:
input_overlay_load_overlays_iterate(driver.overlay);
break;
case OVERLAY_STATUS_DEFERRED_LOADING_RESOLVE:
input_overlay_load_overlays_resolve_iterate(driver.overlay);
break;
case OVERLAY_STATUS_DEFERRED_DONE:
input_overlay_new_done(driver.overlay);
break;
case OVERLAY_STATUS_DEFERRED_ERROR:
input_overlay_free(driver.overlay);
break;
default:
break;
}
}
void rarch_main_data_iterate(void)
{
#ifdef HAVE_OVERLAY
rarch_main_data_overlay_iterate();
#endif
rarch_main_data_nbio_iterate(&g_runloop.data.nbio);
#ifdef HAVE_NETWORKING
rarch_main_data_http_iterate(&g_runloop.data.http);