From e6c38eb8a23b0207b83543bcfe03fa109005ee43 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Tue, 28 Feb 2023 06:17:34 +1100 Subject: ui/ui.cpp: Cleaned out more leftover crud and removed debug printfs. --- src/frontend/mame/ui/ui.cpp | 40 +++++++++------------------------------- src/frontend/mame/ui/ui.h | 4 +--- 2 files changed, 10 insertions(+), 34 deletions(-) diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp index 3907ad6ae71..a8f7ab039b2 100644 --- a/src/frontend/mame/ui/ui.cpp +++ b/src/frontend/mame/ui/ui.cpp @@ -1180,28 +1180,6 @@ void mame_ui_manager::draw_profiler(render_container &container) } -//------------------------------------------------- -// start_save_state -//------------------------------------------------- - -void mame_ui_manager::start_save_state() -{ - show_menu(); - ui::menu::stack_push(*this, machine().render().ui_container(), true); -} - - -//------------------------------------------------- -// start_load_state -//------------------------------------------------- - -void mame_ui_manager::start_load_state() -{ - show_menu(); - ui::menu::stack_push(*this, machine().render().ui_container(), true); -} - - //------------------------------------------------- // image_handler_ingame - execute display // callback function for each image device @@ -1317,8 +1295,8 @@ uint32_t mame_ui_manager::handler_ingame(render_container &container) if (!(machine().debug_flags & DEBUG_FLAG_ENABLED) && machine().ui_input().pressed(IPT_UI_ON_SCREEN_DISPLAY)) { ui::menu::stack_push(*this, machine().render().ui_container(), true); - set_handler(ui_callback_type::MENU, ui::menu::get_ui_handler(*this)); - return 1; + show_menu(); + return 0; } // handle a reset request @@ -1340,7 +1318,7 @@ uint32_t mame_ui_manager::handler_ingame(render_container &container) { return ui_gfx_ui_handler(container, *this, is_paused); })); - return is_paused ? 1 : 0; + return 0; } // handle a tape control key @@ -1364,16 +1342,16 @@ uint32_t mame_ui_manager::handler_ingame(render_container &container) // handle a save state request if (machine().ui_input().pressed(IPT_UI_SAVE_STATE)) { - osd_printf_info("Save requested\n"); - start_save_state(); + ui::menu::stack_push(*this, machine().render().ui_container(), true); + show_menu(); return 0; } // handle a load state request if (machine().ui_input().pressed(IPT_UI_LOAD_STATE)) { - osd_printf_info("Load requested\n"); - start_load_state(); + ui::menu::stack_push(*this, machine().render().ui_container(), true); + show_menu(); return 0; } @@ -1459,8 +1437,8 @@ void mame_ui_manager::request_quit() } else { - show_menu(); ui::menu::stack_push(*this, machine().render().ui_container()); + show_menu(); } } @@ -1473,7 +1451,7 @@ void mame_ui_manager::request_quit() // ui_get_slider_list - get the list of sliders //------------------------------------------------- -std::vector& mame_ui_manager::get_slider_list(void) +std::vector &mame_ui_manager::get_slider_list() { return slider_list; } diff --git a/src/frontend/mame/ui/ui.h b/src/frontend/mame/ui/ui.h index a4056e796a2..cf6bbb5ba57 100644 --- a/src/frontend/mame/ui/ui.h +++ b/src/frontend/mame/ui/ui.h @@ -192,11 +192,9 @@ public: void request_quit(); void draw_fps_counter(render_container &container); void draw_profiler(render_container &container); - void start_save_state(); - void start_load_state(); // slider controls - std::vector& get_slider_list(void); + std::vector& get_slider_list(); // metrics float target_font_height() const { return m_target_font_height; } -- cgit v1.2.3