simpleselgame: The zeroing of the search does not require a reload. nw

This commit is contained in:
dankan1890 2016-02-10 22:25:43 +01:00
parent a9cfa69af9
commit bc2ef66756
2 changed files with 3 additions and 2 deletions

View File

@ -181,8 +181,8 @@ void ui_simple_menu_select_game::inkey_cancel(const ui_menu_event *menu_event)
// escape pressed with non-empty text clears the text // escape pressed with non-empty text clears the text
if (m_search[0] != 0) if (m_search[0] != 0)
{ {
// since we have already been popped, we must recreate ourself from scratch m_search[0] = '\0';
ui_menu::stack_push(global_alloc_clear<ui_simple_menu_select_game>(machine(), container, nullptr)); reset(UI_MENU_RESET_SELECT_FIRST);
} }
} }

View File

@ -27,6 +27,7 @@ public:
// force game select menu // force game select menu
static void force_game_select(running_machine &machine, render_container *container); static void force_game_select(running_machine &machine, render_container *container);
virtual bool menu_has_search_active() override { return (m_search[0] != 0); }
private: private:
// internal state // internal state
enum { VISIBLE_GAMES_IN_LIST = 15 }; enum { VISIBLE_GAMES_IN_LIST = 15 };