all repos — mgba @ e27c10ab78c8109f2c2056854a8f871edf69dc3c

mGBA Game Boy Advance Emulator

Unblock on audio when closing thread
Jeffrey Pfau jeffrey@endrift.com
Thu, 30 Jan 2014 04:03:54 -0800
commit

e27c10ab78c8109f2c2056854a8f871edf69dc3c

parent

6834401e67649c3818842be1e235edac7b641eda

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M src/gba/gba-thread.csrc/gba/gba-thread.c

@@ -204,6 +204,10 @@ threadContext->debugger->state = DEBUGGER_EXITING;

} threadContext->state = THREAD_EXITING; MutexUnlock(&threadContext->stateMutex); + MutexLock(&threadContext->sync.audioBufferMutex); + threadContext->sync.audioWait = 0; + ConditionWake(&threadContext->sync.audioRequiredCond); + MutexUnlock(&threadContext->sync.audioBufferMutex); } void GBAThreadJoin(struct GBAThread* threadContext) {