mirror of https://github.com/bsnes-emu/bsnes.git
Fixed another reset-while-debugging deadlock in Cocoa
This commit is contained in:
parent
01fc137256
commit
62ecadeb57
|
@ -153,6 +153,7 @@ static uint32_t rgbEncode(GB_gameboy_t *gb, uint8_t r, uint8_t g, uint8_t b)
|
|||
- (void) stop
|
||||
{
|
||||
if (!running) return;
|
||||
gb.debug_disable = true;
|
||||
if (gb.debug_stopped) {
|
||||
gb.debug_stopped = false;
|
||||
[self consoleInput:nil];
|
||||
|
@ -160,6 +161,7 @@ static uint32_t rgbEncode(GB_gameboy_t *gb, uint8_t r, uint8_t g, uint8_t b)
|
|||
stopping = true;
|
||||
running = false;
|
||||
while (stopping);
|
||||
gb.debug_disable = false;
|
||||
}
|
||||
|
||||
- (IBAction)reset:(id)sender
|
||||
|
|
|
@ -1463,6 +1463,8 @@ bool GB_debugger_do_command(GB_gameboy_t *gb, char *input)
|
|||
|
||||
void GB_debugger_run(GB_gameboy_t *gb)
|
||||
{
|
||||
if (gb->debug_disable) return;
|
||||
|
||||
char *input = NULL;
|
||||
if (gb->debug_next_command && gb->debug_call_depth <= 0) {
|
||||
gb->debug_stopped = true;
|
||||
|
@ -1482,7 +1484,7 @@ next_command:
|
|||
GB_log(gb, "Breakpoint: PC = %s\n", value_to_string(gb, gb->pc, true));
|
||||
GB_cpu_disassemble(gb, gb->pc, 5);
|
||||
}
|
||||
if (gb->debug_stopped) {
|
||||
if (gb->debug_stopped && !gb->debug_disable) {
|
||||
gb->debug_next_command = false;
|
||||
gb->debug_fin_command = false;
|
||||
gb->stack_leak_detection = false;
|
||||
|
|
Loading…
Reference in New Issue