mirror of
https://github.com/holub/mame
synced 2025-06-24 21:34:43 +03:00
Factored out quit/confirmquit logic into ui_manager::request_quit()
This commit is contained in:
parent
09ee48d11a
commit
a2ff7cf249
@ -1525,10 +1525,8 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co
|
|||||||
|
|
||||||
if (ui_input_pressed(machine, IPT_UI_CANCEL))
|
if (ui_input_pressed(machine, IPT_UI_CANCEL))
|
||||||
{
|
{
|
||||||
if (!machine.options().confirm_quit())
|
machine.ui().request_quit();
|
||||||
machine.schedule_exit();
|
return 0;
|
||||||
else
|
|
||||||
return machine.ui().set_handler(handler_confirm_quit, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// turn on menus if requested
|
// turn on menus if requested
|
||||||
@ -1694,6 +1692,19 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// request_quit
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void ui_manager::request_quit()
|
||||||
|
{
|
||||||
|
if (!machine().options().confirm_quit())
|
||||||
|
machine().schedule_exit();
|
||||||
|
else
|
||||||
|
set_handler(handler_confirm_quit, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// handler_confirm_quit - leads the user through
|
// handler_confirm_quit - leads the user through
|
||||||
// confirming quit emulation
|
// confirming quit emulation
|
||||||
|
@ -157,6 +157,7 @@ public:
|
|||||||
void image_handler_ingame();
|
void image_handler_ingame();
|
||||||
void increase_frameskip();
|
void increase_frameskip();
|
||||||
void decrease_frameskip();
|
void decrease_frameskip();
|
||||||
|
void request_quit();
|
||||||
|
|
||||||
// print the game info string into a buffer
|
// print the game info string into a buffer
|
||||||
astring &game_info_astring(astring &string);
|
astring &game_info_astring(astring &string);
|
||||||
|
Loading…
Reference in New Issue
Block a user