branches/new_menus/src/emu/ui/menubar.c
| r29564 | r29565 | |
| 64 | 64 | m_mouse_x = -1; |
| 65 | 65 | m_mouse_y = -1; |
| 66 | 66 | m_mouse_button = false; |
| 67 | m_last_mouse_move = 0; |
| 67 | 68 | } |
| 68 | 69 | |
| 69 | 70 | |
| r29564 | r29565 | |
| 726 | 727 | menubar_visibility_t result; |
| 727 | 728 | |
| 728 | 729 | // is the mouse in the menu bar? |
| 729 | | bool in_menu_bar = m_mouse_y <= machine().ui().get_line_height(); |
| 730 | bool in_menu_bar = (m_mouse_y >= 0) && (m_mouse_y <= machine().ui().get_line_height()); |
| 730 | 731 | |
| 731 | 732 | // did we recently move the mouse? |
| 732 | | bool recently_moved = (osd_ticks() - m_last_mouse_move) * 5 / osd_ticks_per_second() < 1; |
| 733 | bool recently_moved = (m_last_mouse_move != 0) |
| 734 | && ((osd_ticks() - m_last_mouse_move) * 5 / osd_ticks_per_second() < 1); |
| 733 | 735 | |
| 734 | 736 | // make the choice |
| 735 | 737 | if ((m_selected_item != NULL) || (m_active_item != NULL)) |