Another attemp to fix Cocoa deadlocking

This commit is contained in:
Lior Halphon 2020-02-15 19:23:04 +02:00
parent bec09a012c
commit bf32ae66c6
1 changed files with 2 additions and 0 deletions

View File

@ -374,7 +374,9 @@ static void audioCallback(GB_gameboy_t *gb, GB_sample_t *sample)
if (GB_debugger_is_stopped(&gb)) { if (GB_debugger_is_stopped(&gb)) {
[self interruptDebugInputRead]; [self interruptDebugInputRead];
} }
[audioLock lock];
stopping = true; stopping = true;
[audioLock unlock];
running = false; running = false;
while (stopping); while (stopping);
GB_debugger_set_disabled(&gb, false); GB_debugger_set_disabled(&gb, false);