Fix main thread stalling when starting a game

This commit is contained in:
Jeffrey Pfau 2013-10-17 23:10:16 -07:00
parent 62d941a979
commit ea41ef7ae6
1 changed files with 1 additions and 0 deletions

View File

@ -139,6 +139,7 @@ int GBAThreadStart(struct GBAThread* threadContext) {
threadContext->activeKeys = 0;
threadContext->state = THREAD_INITIALIZED;
threadContext->sync.videoFrameOn = 1;
threadContext->sync.videoFrameSkip = 0;
pthread_create(&threadContext->thread, 0, _GBAThreadRun, threadContext);
pthread_cond_wait(&threadContext->stateCond, &threadContext->stateMutex);
pthread_mutex_unlock(&threadContext->stateMutex);