Reimplement menu clear input courtesy of meancoot

This commit is contained in:
twinaphex 2014-02-18 02:18:34 +01:00
parent ac550dc1dc
commit 9d6a0afd4a
2 changed files with 13 additions and 5 deletions

View File

@ -191,6 +191,17 @@ int main_entry_iterate(signature(), args_type() args)
#endif
return 1;
}
else if (g_extern.lifecycle_state & (1ULL << MODE_CLEAR_INPUT))
{
rarch_input_poll();
if (!menu_input())
{
// Restore libretro keyboard callback.
g_extern.system.key_event = key_event;
g_extern.lifecycle_state &= ~(1ULL << MODE_CLEAR_INPUT);
}
}
else if (g_extern.lifecycle_state & (1ULL << MODE_LOAD_GAME))
{
load_menu_game_prepare();
@ -279,11 +290,7 @@ int main_entry_iterate(signature(), args_type() args)
g_extern.audio_active = false;
}
while (menu_input())
rarch_input_poll();
// Restore libretro keyboard callback.
g_extern.system.key_event = key_event;
g_extern.lifecycle_state |= (1ULL << MODE_CLEAR_INPUT);
}
}
#endif

View File

@ -109,6 +109,7 @@ enum menu_enums
MODE_AUDIO_CUSTOM_BGM_ENABLE,
MODE_OSK_ENTRY_SUCCESS,
MODE_OSK_ENTRY_FAIL,
MODE_CLEAR_INPUT,
};
enum sound_mode_enums