(Android) Do window ready checking differently

This commit is contained in:
twinaphex 2012-12-18 06:01:56 +01:00
parent 3570ba80d2
commit 2e5f21db60
3 changed files with 4 additions and 6 deletions

View File

@ -34,6 +34,7 @@ struct droid
unsigned height;
struct saved_state state;
int32_t last_orient;
bool window_ready;
float disp_refresh_rate;
};

View File

@ -222,7 +222,7 @@ void engine_handle_cmd(struct android_app* android_app, int32_t cmd)
if(g_extern.lifecycle_state & (1ULL << RARCH_REENTRANT))
{
uninit_drivers();
g_extern.lifecycle_state &= ~(1ULL << RARCH_WINDOW_READY);
g_android.window_ready = false;
}
/* POSTEXEC */
@ -282,7 +282,7 @@ bool android_run_events(struct android_app* android_app)
init_drivers();
if (android_app->window != NULL)
g_extern.lifecycle_state |= (1ULL << RARCH_WINDOW_READY);
g_android.window_ready = true;
}
}
@ -414,7 +414,7 @@ static void* android_app_entry(void* param)
RARCH_LOG("Setting RetroArch video refresh rate to: %.2fHz.\n", g_android.disp_refresh_rate);
while(!(g_extern.lifecycle_state & (1ULL << RARCH_WINDOW_READY)))
while(!g_android.window_ready)
{
if(!android_run_events(android_app))
goto exit;

View File

@ -103,9 +103,6 @@ enum // RetroArch specific bind IDs.
RARCH_CHEAT_INPUT,
RARCH_SRAM_WRITE_PROTECT,
#endif
#ifdef ANDROID
RARCH_WINDOW_READY,
#endif
#ifdef HAVE_RMENU
RARCH_RMENU_TOGGLE,
RARCH_RMENU_QUICKMENU_TOGGLE,