diff options
author | Nathan Woods <npwoods@mess.org> | 2014-04-12 14:40:00 +0000 |
---|---|---|
committer | Nathan Woods <npwoods@mess.org> | 2014-04-12 14:40:00 +0000 |
commit | 0be111068bea5b647dfbe807ec55187bf5c28db7 (patch) | |
tree | 9d415c95c295eb64a40b6b756f31852c23ecd94a | |
parent | c40147acf8163be26bf9f1c747257cfcce039d52 (diff) |
Fixed issues with menubar's bad interactions with pausing
-rw-r--r-- | src/emu/ui/menubar.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/emu/ui/menubar.c b/src/emu/ui/menubar.c index 810b8c64ddf..72577d3f2ee 100644 --- a/src/emu/ui/menubar.c +++ b/src/emu/ui/menubar.c @@ -64,6 +64,7 @@ ui_menubar::ui_menubar(running_machine &machine) m_mouse_x = -1; m_mouse_y = -1; m_mouse_button = false; + m_last_mouse_move = 0; } @@ -726,10 +727,11 @@ ui_menubar::menubar_visibility_t ui_menubar::get_menubar_visibility() menubar_visibility_t result; // is the mouse in the menu bar? - bool in_menu_bar = m_mouse_y <= machine().ui().get_line_height(); + bool in_menu_bar = (m_mouse_y >= 0) && (m_mouse_y <= machine().ui().get_line_height()); // did we recently move the mouse? - bool recently_moved = (osd_ticks() - m_last_mouse_move) * 5 / osd_ticks_per_second() < 1; + bool recently_moved = (m_last_mouse_move != 0) + && ((osd_ticks() - m_last_mouse_move) * 5 / osd_ticks_per_second() < 1); // make the choice if ((m_selected_item != NULL) || (m_active_item != NULL)) |