From 1abf53ca6a7a01ae2d4491825a97b0a4baef634a Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 10 Jul 2016 02:42:38 +1000 Subject: UI code refactoring: [Vas Crabb] * Split out main menu and dat box drawing from base class * Make a bunch of class statics proper per-machine persistent objects * Object lifecycle fixes --- src/frontend/mame/ui/ui.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/frontend/mame/ui/ui.cpp') diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp index df941f3ceb7..c54ad7ebcd4 100644 --- a/src/frontend/mame/ui/ui.cpp +++ b/src/frontend/mame/ui/ui.cpp @@ -289,7 +289,7 @@ void mame_ui_manager::display_startup_screens(bool first_time) // loop over states set_handler(UI_CALLBACK_TYPE_GENERAL, &mame_ui_manager::handler_ingame); - for (state = 0; state < maxstate && !machine().scheduled_event_pending() && !ui::menu::stack_has_special_main_menu(); state++) + for (state = 0; state < maxstate && !machine().scheduled_event_pending() && !ui::menu::stack_has_special_main_menu(machine()); state++) { // default to standard colors messagebox_backcolor = UI_BACKGROUND_COLOR; @@ -328,7 +328,7 @@ void mame_ui_manager::display_startup_screens(bool first_time) while (machine().input().poll_switches() != INPUT_CODE_INVALID) { } // loop while we have a handler - while (m_handler_callback_type == UI_CALLBACK_TYPE_MODAL && !machine().scheduled_event_pending() && !ui::menu::stack_has_special_main_menu()) + while (m_handler_callback_type == UI_CALLBACK_TYPE_MODAL && !machine().scheduled_event_pending() && !ui::menu::stack_has_special_main_menu(machine())) { machine().video().frame_update(); } @@ -339,7 +339,7 @@ void mame_ui_manager::display_startup_screens(bool first_time) } // if we're the empty driver, force the menus on - if (ui::menu::stack_has_special_main_menu()) + if (ui::menu::stack_has_special_main_menu(machine())) show_menu(); } @@ -381,7 +381,7 @@ void mame_ui_manager::update_and_render(render_container *container) if (machine().phase() >= MACHINE_PHASE_RESET && (single_step() || machine().paused())) { int alpha = (1.0f - machine().options().pause_brightness()) * 255.0f; - if (ui::menu::stack_has_special_main_menu()) + if (ui::menu::stack_has_special_main_menu(machine())) alpha = 255; if (alpha > 255) alpha = 255; -- cgit v1.2.3-70-g09d2