mirror of https://github.com/mgba-emu/mgba.git
Unblock on audio when closing thread
This commit is contained in:
parent
6834401e67
commit
e27c10ab78
|
@ -204,6 +204,10 @@ void GBAThreadEnd(struct GBAThread* threadContext) {
|
||||||
}
|
}
|
||||||
threadContext->state = THREAD_EXITING;
|
threadContext->state = THREAD_EXITING;
|
||||||
MutexUnlock(&threadContext->stateMutex);
|
MutexUnlock(&threadContext->stateMutex);
|
||||||
|
MutexLock(&threadContext->sync.audioBufferMutex);
|
||||||
|
threadContext->sync.audioWait = 0;
|
||||||
|
ConditionWake(&threadContext->sync.audioRequiredCond);
|
||||||
|
MutexUnlock(&threadContext->sync.audioBufferMutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GBAThreadJoin(struct GBAThread* threadContext) {
|
void GBAThreadJoin(struct GBAThread* threadContext) {
|
||||||
|
|
Loading…
Reference in New Issue