From bc2ef66756bf9605c1b6ab176798a1c1613a0eb0 Mon Sep 17 00:00:00 2001 From: dankan1890 Date: Wed, 10 Feb 2016 22:25:43 +0100 Subject: [PATCH] simpleselgame: The zeroing of the search does not require a reload. nw --- src/emu/ui/simpleselgame.cpp | 4 ++-- src/emu/ui/simpleselgame.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/emu/ui/simpleselgame.cpp b/src/emu/ui/simpleselgame.cpp index 8f5ada60071..0c0705e8414 100644 --- a/src/emu/ui/simpleselgame.cpp +++ b/src/emu/ui/simpleselgame.cpp @@ -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 if (m_search[0] != 0) { - // since we have already been popped, we must recreate ourself from scratch - ui_menu::stack_push(global_alloc_clear(machine(), container, nullptr)); + m_search[0] = '\0'; + reset(UI_MENU_RESET_SELECT_FIRST); } } diff --git a/src/emu/ui/simpleselgame.h b/src/emu/ui/simpleselgame.h index 50fcf10a432..316e3747b2f 100644 --- a/src/emu/ui/simpleselgame.h +++ b/src/emu/ui/simpleselgame.h @@ -27,6 +27,7 @@ public: // force game select menu static void force_game_select(running_machine &machine, render_container *container); + virtual bool menu_has_search_active() override { return (m_search[0] != 0); } private: // internal state enum { VISIBLE_GAMES_IN_LIST = 15 };