summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2023-03-23 04:02:46 +1100
committer Vas Crabb <vas@vastheman.com>2023-03-23 04:02:46 +1100
commitdda5f71a40ba2ba3cf463a0891f24296fbd45b34 (patch)
tree42cd393c33f39bdf088fa79e865cb9004aed0d32 /src/frontend/mame/ui
parent00f317b3d321d25b3ca404870beb7e12b092c376 (diff)
-luaengine.cpp: Expose UI controls toggle state.
-ui/ui.cpp: Honour UI enable for machines without keyboards.
Diffstat (limited to 'src/frontend/mame/ui')
-rw-r--r--src/frontend/mame/ui/ui.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp
index 36932c91d15..acbb13ec226 100644
--- a/src/frontend/mame/ui/ui.cpp
+++ b/src/frontend/mame/ui/ui.cpp
@@ -335,6 +335,7 @@ void mame_ui_manager::config_save(config_type cfg_type, util::xml::data_node *pa
void mame_ui_manager::initialize(running_machine &machine)
{
m_machine_info = std::make_unique<ui::machine_info>(machine);
+ machine.set_ui_active(!machine_info().has_keyboard() || machine.options().ui_active());
// initialize the on-screen display system
slider_list = slider_init(machine);
@@ -1241,8 +1242,8 @@ uint32_t mame_ui_manager::handler_ingame(render_container &container)
}
// determine if we should disable the rest of the UI
- bool has_keyboard = machine_info().has_keyboard();
- bool ui_disabled = (has_keyboard && !machine().ui_active());
+ bool const has_keyboard = machine_info().has_keyboard();
+ bool const ui_disabled = !machine().ui_active();
// is ScrLk UI toggling applicable here?
if (has_keyboard)