diff options
author | Nathan Woods <npwoods@mess.org> | 2014-04-12 17:21:38 +0000 |
---|---|---|
committer | Nathan Woods <npwoods@mess.org> | 2014-04-12 17:21:38 +0000 |
commit | 536ecccd455e598dfeba17a5dc089b08d73a9530 (patch) | |
tree | d8ab9e25c1ea0001c0497a06b3b42ee49cfed519 | |
parent | dceb1f5f4dbbc43c15f5f8cc779f2fd778363701 (diff) |
Swallowing shortcut keys the first time the menu comes up; now ESC in the F4 menu won't break outnew_menus
-rw-r--r-- | src/emu/ui/menubar.c | 4 | ||||
-rw-r--r-- | src/emu/ui/menubar.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/emu/ui/menubar.c b/src/emu/ui/menubar.c index bbc04d2e14d..2b5ab15cf68 100644 --- a/src/emu/ui/menubar.c +++ b/src/emu/ui/menubar.c @@ -65,6 +65,7 @@ ui_menubar::ui_menubar(running_machine &machine) m_mouse_y = -1; m_mouse_button = false; m_last_mouse_move = 0; + m_first_time = true; } @@ -239,7 +240,8 @@ bool ui_menubar::event_loop() if (!done) { bool navigation_input_pressed = poll_navigation_keys(); - poll_shortcut_keys(navigation_input_pressed); + poll_shortcut_keys(navigation_input_pressed || m_first_time); + m_first_time = false; done = true; } return done; diff --git a/src/emu/ui/menubar.h b/src/emu/ui/menubar.h index 84903ef5a83..57417e0f0e4 100644 --- a/src/emu/ui/menubar.h +++ b/src/emu/ui/menubar.h @@ -226,6 +226,7 @@ private: float m_checkmark_width; osd_ticks_t m_last_mouse_move; menubar_visibility_t m_menubar_visibility; + bool m_first_time; // selection walking bool walk_selection_previous(); |