diff options
author | Aaron Giles <aaron@aarongiles.com> | 2008-06-24 05:21:19 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2008-06-24 05:21:19 +0000 |
commit | 75a009ac400f52e4ff9371f7f2ea08fe7dc47e0a (patch) | |
tree | e217dc093061399b7830508f6c3ca6cdaf9768ee | |
parent | 2be66a245ca0bd2e3990a1d997674ddc8b921bf1 (diff) |
Do not stop in the debugger while we are waiting for a pending
event to occur. This eliminates some confusion during reset and
state loading.
-rw-r--r-- | src/emu/debug/debugcpu.c | 2 | ||||
-rw-r--r-- | src/emu/mame.c | 14 | ||||
-rw-r--r-- | src/emu/mame.h | 3 |
3 files changed, 18 insertions, 1 deletions
diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c index d0ad7d3e977..039024c2728 100644 --- a/src/emu/debug/debugcpu.c +++ b/src/emu/debug/debugcpu.c @@ -844,7 +844,7 @@ void mame_debug_hook(offs_t curpc) } /* if we are supposed to halt, do it now */ - if (execution_state == EXECUTION_STATE_STOPPED) + if (execution_state == EXECUTION_STATE_STOPPED && !mame_is_scheduled_event_pending(Machine) && !mame_is_save_or_load_pending(Machine)) { /* reset the state */ steps_until_stop = 0; diff --git a/src/emu/mame.c b/src/emu/mame.c index 59080037c73..0edc32d73db 100644 --- a/src/emu/mame.c +++ b/src/emu/mame.c @@ -743,6 +743,20 @@ void mame_schedule_load(running_machine *machine, const char *filename) /*------------------------------------------------- + mame_is_save_or_load_pending - is a save or + load pending? +-------------------------------------------------*/ + +int mame_is_save_or_load_pending(running_machine *machine) +{ + /* we can't check for saveload_pending_file here because it will bypass */ + /* required UI screens if a state is queued from the command line */ + mame_private *mame = machine->mame_data; + return (mame->saveload_pending_file != NULL); +} + + +/*------------------------------------------------- mame_is_scheduled_event_pending - is a scheduled event pending? -------------------------------------------------*/ diff --git a/src/emu/mame.h b/src/emu/mame.h index ba75430b4ec..33598c850a8 100644 --- a/src/emu/mame.h +++ b/src/emu/mame.h @@ -302,6 +302,9 @@ void mame_schedule_save(running_machine *machine, const char *filename); /* schedule a load */ void mame_schedule_load(running_machine *machine, const char *filename); +/* is a save or load pending? */ +int mame_is_save_or_load_pending(running_machine *machine); + /* is a scheduled event pending? */ int mame_is_scheduled_event_pending(running_machine *machine); |