Refactor MENU_CLEAR_INPUT

This commit is contained in:
twinaphex 2014-09-21 06:41:47 +02:00
parent 9dc35b056f
commit 7056c9ca39
3 changed files with 6 additions and 25 deletions

View File

@ -73,8 +73,6 @@ int main_entry_decide(signature(), args_type() args)
#ifdef HAVE_MENU
if (g_extern.system.shutdown)
return main_entry_iterate_shutdown(signature_expand(), args);
if (g_extern.lifecycle_state & (1ULL << MODE_CLEAR_INPUT))
return main_entry_iterate_clear_input(signature_expand(), args);
if (g_extern.lifecycle_state & (1ULL << MODE_LOAD_GAME))
return main_entry_iterate_load_content(signature_expand(), args);
if (g_extern.lifecycle_state & (1ULL << MODE_GAME))
@ -112,23 +110,6 @@ static int main_entry_iterate_content_nomenu(signature(), args_type() args)
}
#endif
int main_entry_iterate_clear_input(signature(), args_type() args)
{
(void)args;
rarch_input_poll();
#ifdef HAVE_MENU
if (menu_input())
return 0;
#endif
/* Restore libretro keyboard callback. */
g_extern.system.key_event = g_extern.frontend_key_event;
rarch_main_set_state(RARCH_ACTION_STATE_FLUSH_INPUT_FINISHED);
return 0;
}
int main_entry_iterate_load_content(signature(), args_type() args)
{
#ifdef HAVE_MENU

View File

@ -145,7 +145,6 @@ enum action_state
RARCH_ACTION_STATE_MENU_RUNNING_FINISHED,
RARCH_ACTION_STATE_EXITSPAWN,
RARCH_ACTION_STATE_FLUSH_INPUT,
RARCH_ACTION_STATE_FLUSH_INPUT_FINISHED,
RARCH_ACTION_STATE_QUIT,
RARCH_ACTION_STATE_FORCE_QUIT,
};
@ -163,7 +162,6 @@ enum menu_enums
MODE_EXITSPAWN_MULTIMAN,
MODE_OSK_ENTRY_SUCCESS,
MODE_OSK_ENTRY_FAIL,
MODE_CLEAR_INPUT,
};
enum sound_mode_enums

View File

@ -3239,10 +3239,12 @@ void rarch_main_set_state(unsigned cmd)
rarch_main_set_state(RARCH_ACTION_STATE_QUIT);
break;
case RARCH_ACTION_STATE_FLUSH_INPUT:
g_extern.lifecycle_state |= (1ULL << MODE_CLEAR_INPUT);
break;
case RARCH_ACTION_STATE_FLUSH_INPUT_FINISHED:
g_extern.lifecycle_state &= ~(1ULL << MODE_CLEAR_INPUT);
rarch_input_poll();
#ifdef HAVE_MENU
menu_input();
#endif
/* Restore libretro keyboard callback. */
g_extern.system.key_event = g_extern.frontend_key_event;
break;
case RARCH_ACTION_STATE_NONE:
default: