summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/ui/ui.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2016-07-10 02:42:38 +1000
committer Vas Crabb <vas@vastheman.com>2016-07-10 03:01:13 +1000
commit1abf53ca6a7a01ae2d4491825a97b0a4baef634a (patch)
tree2a061c81dab912dbf52f8cdd54f97507820029dd /src/frontend/mame/ui/ui.cpp
parent2364b48f0dd496de3908fa4d3bcd24693a5f6231 (diff)
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
Diffstat (limited to 'src/frontend/mame/ui/ui.cpp')
-rw-r--r--src/frontend/mame/ui/ui.cpp8
1 files changed, 4 insertions, 4 deletions
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;