diff options
author | Vas Crabb <vas@vastheman.com> | 2023-03-23 14:39:56 +1100 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2023-03-23 14:39:56 +1100 |
commit | 0562745629241598429fcb4ba78086f74369979a (patch) | |
tree | f2282f98cf3f211ebc3f8dbc3afe53efe59de974 /src/frontend/mame/ui | |
parent | 160a2219901ca0f63ca976f0ed9eb5a413bf41db (diff) |
Retired the over-stretched "system type" flags.
Functionally, the only difference between the system definitions is that
GAMEL lets you specify an additional internal layout and SYST lets you
specify a compatible system. COMP and CONS are just aliases for SYST -
the aliases can be phased out.
Removed arcade.flt and mess.flt altogether - opinion seems to be split
between misinterpreting them as fully supported and considering them
unnecessary. They were marginally useful as a performance test for
makedep.py, but that isn't important. We still have nl.flt as an
example .flt file (although it doesn't use "-" exclude directives).
Moved the UI active flag from the machine to the UI manager. Nothing
else uses it anyway (it's still accessible to scripts).
Diffstat (limited to 'src/frontend/mame/ui')
-rw-r--r-- | src/frontend/mame/ui/ui.cpp | 9 | ||||
-rw-r--r-- | src/frontend/mame/ui/ui.h | 3 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp index acbb13ec226..b839e363195 100644 --- a/src/frontend/mame/ui/ui.cpp +++ b/src/frontend/mame/ui/ui.cpp @@ -163,6 +163,7 @@ mame_ui_manager::mame_ui_manager(running_machine &machine) , m_font() , m_handler_callback() , m_handler_callback_type(ui_callback_type::GENERAL) + , m_ui_active(true) , m_single_step(false) , m_showfps(false) , m_showfps_end(0) @@ -335,7 +336,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()); + set_ui_active(!machine_info().has_keyboard() || machine.options().ui_active()); // initialize the on-screen display system slider_list = slider_init(machine); @@ -1243,7 +1244,7 @@ uint32_t mame_ui_manager::handler_ingame(render_container &container) // determine if we should disable the rest of the UI bool const has_keyboard = machine_info().has_keyboard(); - bool const ui_disabled = !machine().ui_active(); + bool const ui_disabled = !ui_active(); // is ScrLk UI toggling applicable here? if (has_keyboard) @@ -1252,11 +1253,11 @@ uint32_t mame_ui_manager::handler_ingame(render_container &container) if (machine().ui_input().pressed(IPT_UI_TOGGLE_UI)) { // toggle the UI - machine().set_ui_active(!machine().ui_active()); + set_ui_active(!ui_active()); // display a popup indicating the new status std::string const name = get_general_input_setting(IPT_UI_TOGGLE_UI); - if (machine().ui_active()) + if (ui_active()) popup_time(2, _("UI controls enabled\nUse %1$s to toggle"), name); else popup_time(2, _("UI controls disabled\nUse %1$s to toggle"), name); diff --git a/src/frontend/mame/ui/ui.h b/src/frontend/mame/ui/ui.h index cf6bbb5ba57..ebf0f74760e 100644 --- a/src/frontend/mame/ui/ui.h +++ b/src/frontend/mame/ui/ui.h @@ -175,6 +175,8 @@ public: void save_main_option(); template <typename Format, typename... Params> void popup_time(int seconds, Format &&fmt, Params &&... args); + void set_ui_active(bool active) { m_ui_active = active; } + bool ui_active() const { return m_ui_active; } void show_fps_temp(double seconds); void set_show_fps(bool show); bool show_fps() const; @@ -238,6 +240,7 @@ private: std::unique_ptr<render_font> m_font; handler_callback_func m_handler_callback; ui_callback_type m_handler_callback_type; + bool m_ui_active; bool m_single_step; bool m_showfps; osd_ticks_t m_showfps_end; |