diff options
author | 2016-06-24 23:28:42 +0200 | |
---|---|---|
committer | 2016-06-24 23:28:42 +0200 | |
commit | 798bb7956756fcb8f356dcaeeaf7fe1e31dab8da (patch) | |
tree | 038713be6e2512f886d55a9ac9a9afc92a70d9c8 /src/frontend/mame/ui/ui.cpp | |
parent | bc37304ef96e335810e7dc10367e7e7faa2d3c1d (diff) | |
parent | b3491464e41b6afea81e188fe6a350d4f778854b (diff) |
Merge remote-tracking branch 'origin/master' into netlist_dev
Diffstat (limited to 'src/frontend/mame/ui/ui.cpp')
-rw-r--r-- | src/frontend/mame/ui/ui.cpp | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp index 24d7b61fd2e..df941f3ceb7 100644 --- a/src/frontend/mame/ui/ui.cpp +++ b/src/frontend/mame/ui/ui.cpp @@ -1210,6 +1210,30 @@ void mame_ui_manager::draw_profiler(render_container *container) //------------------------------------------------- +// start_save_state +//------------------------------------------------- + +void mame_ui_manager::start_save_state() +{ + machine().pause(); + m_load_save_hold = true; + set_handler(UI_CALLBACK_TYPE_GENERAL, &mame_ui_manager::handler_load_save, (UINT32)LOADSAVE_SAVE); +} + + +//------------------------------------------------- +// start_load_state +//------------------------------------------------- + +void mame_ui_manager::start_load_state() +{ + machine().pause(); + m_load_save_hold = true; + set_handler(UI_CALLBACK_TYPE_GENERAL, &mame_ui_manager::handler_load_save, (UINT32)LOADSAVE_LOAD); +} + + +//------------------------------------------------- // image_handler_ingame - execute display // callback function for each image device //------------------------------------------------- @@ -1386,18 +1410,14 @@ UINT32 mame_ui_manager::handler_ingame(render_container *container) // handle a save state request if (machine().ui_input().pressed(IPT_UI_SAVE_STATE)) { - machine().pause(); - m_load_save_hold = true; - set_handler(UI_CALLBACK_TYPE_GENERAL, &mame_ui_manager::handler_load_save, (UINT32)LOADSAVE_SAVE); + start_save_state(); return LOADSAVE_SAVE; } // handle a load state request if (machine().ui_input().pressed(IPT_UI_LOAD_STATE)) { - machine().pause(); - m_load_save_hold = true; - set_handler(UI_CALLBACK_TYPE_GENERAL, &mame_ui_manager::handler_load_save, (UINT32)LOADSAVE_LOAD); + start_load_state(); return LOADSAVE_LOAD; } |