mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
Readding single step capability
This commit is contained in:
parent
64e1b14297
commit
2365ce7efb
@ -734,7 +734,8 @@ void construct_core_types_ui_shortcuts(simple_list<input_type_entry> &typelist)
|
||||
{
|
||||
INPUT_PORT_DIGITAL_TYPE( 0, UI_SHORTCUT, UI_ON_SCREEN_DISPLAY,"On Screen Display", input_seq(KEYCODE_TILDE) )
|
||||
INPUT_PORT_DIGITAL_TYPE( 0, UI_SHORTCUT, UI_DEBUG_BREAK, "Break in Debugger", input_seq(KEYCODE_TILDE) )
|
||||
INPUT_PORT_DIGITAL_TYPE( 0, UI_SHORTCUT, UI_PAUSE, "Pause", input_seq(KEYCODE_P) )
|
||||
INPUT_PORT_DIGITAL_TYPE( 0, UI_SHORTCUT, UI_PAUSE, "Pause", input_seq(KEYCODE_P, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT ) )
|
||||
INPUT_PORT_DIGITAL_TYPE( 0, UI_SHORTCUT, UI_SINGLE_STEP, "Single Step", input_seq(KEYCODE_P, KEYCODE_LSHIFT, input_seq::or_code, KEYCODE_P, KEYCODE_RSHIFT ) )
|
||||
INPUT_PORT_DIGITAL_TYPE( 0, UI_SHORTCUT, UI_RESET_MACHINE, "Reset Game", input_seq(KEYCODE_F3, KEYCODE_LSHIFT) )
|
||||
INPUT_PORT_DIGITAL_TYPE( 0, UI_SHORTCUT, UI_SOFT_RESET, "Soft Reset", input_seq(KEYCODE_F3, input_seq::not_code, KEYCODE_LSHIFT) )
|
||||
INPUT_PORT_DIGITAL_TYPE( 0, UI_SHORTCUT, UI_EXIT, "Exit", input_seq(KEYCODE_ESC) )
|
||||
|
@ -334,6 +334,7 @@ enum ioport_type
|
||||
IPT_UI_ON_SCREEN_DISPLAY,
|
||||
IPT_UI_DEBUG_BREAK,
|
||||
IPT_UI_PAUSE,
|
||||
IPT_UI_SINGLE_STEP,
|
||||
IPT_UI_RESET_MACHINE,
|
||||
IPT_UI_SOFT_RESET,
|
||||
IPT_UI_SHOW_GFX,
|
||||
|
@ -119,6 +119,13 @@ void ui_emu_menubar::menubar_draw_ui_elements()
|
||||
machine().ui().draw_text_full(container(), text, 0.0f, 0.0f, 1.0f, JUSTIFY_LEFT, WRAP_WORD, DRAW_OPAQUE, ARGB_WHITE, ARGB_BLACK, NULL, NULL);
|
||||
}
|
||||
|
||||
// if we're single-stepping, pause now
|
||||
if (machine().ui().single_step())
|
||||
{
|
||||
machine().pause();
|
||||
machine().ui().set_single_step(false);
|
||||
}
|
||||
|
||||
// check for fast forward
|
||||
if (machine().ioport().type_pressed(IPT_UI_FAST_FORWARD))
|
||||
{
|
||||
@ -194,6 +201,9 @@ void ui_emu_menubar::build_file_menu()
|
||||
menu_item &pause_menu = file_menu.append("Pause", &running_machine::toggle_pause, machine(), IPT_UI_PAUSE);
|
||||
pause_menu.set_checked(machine().paused());
|
||||
|
||||
// single step
|
||||
file_menu.append("Single Step", &ui_manager::do_single_step, machine().ui(), IPT_UI_PAUSE);
|
||||
|
||||
// reset
|
||||
menu_item &reset_menu = file_menu.append("Reset");
|
||||
reset_menu.append("Hard", &running_machine::schedule_hard_reset, machine(), IPT_UI_RESET_MACHINE);
|
||||
|
@ -1551,6 +1551,17 @@ void ui_manager::request_quit()
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// do_single_step
|
||||
//-------------------------------------------------
|
||||
|
||||
void ui_manager::do_single_step()
|
||||
{
|
||||
set_single_step(true);
|
||||
machine().resume();
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// handler_confirm_quit - leads the user through
|
||||
// confirming quit emulation
|
||||
|
@ -170,6 +170,7 @@ public:
|
||||
void increase_frameskip();
|
||||
void decrease_frameskip();
|
||||
void request_quit();
|
||||
void do_single_step();
|
||||
|
||||
// UI handlers
|
||||
static UINT32 ui_handler_load_save(running_machine &machine, render_container *container, UINT32 state);
|
||||
|
Loading…
Reference in New Issue
Block a user