mirror of https://github.com/mgba-emu/mgba.git
GBA Thread: Make sure idle loop setting is set at the right time
This commit is contained in:
parent
dba275c570
commit
075308e837
|
@ -124,6 +124,7 @@ static THREAD_ENTRY _GBAThreadRun(void* context) {
|
||||||
gba.sync = &threadContext->sync;
|
gba.sync = &threadContext->sync;
|
||||||
threadContext->gba = &gba;
|
threadContext->gba = &gba;
|
||||||
gba.logLevel = threadContext->logLevel;
|
gba.logLevel = threadContext->logLevel;
|
||||||
|
gba.idleOptimization = threadContext->idleOptimization;
|
||||||
#ifdef USE_PTHREADS
|
#ifdef USE_PTHREADS
|
||||||
pthread_setspecific(_contextKey, threadContext);
|
pthread_setspecific(_contextKey, threadContext);
|
||||||
#else
|
#else
|
||||||
|
@ -173,7 +174,6 @@ static THREAD_ENTRY _GBAThreadRun(void* context) {
|
||||||
GBASIOSetDriverSet(&gba.sio, &threadContext->sioDrivers);
|
GBASIOSetDriverSet(&gba.sio, &threadContext->sioDrivers);
|
||||||
|
|
||||||
gba.keySource = &threadContext->activeKeys;
|
gba.keySource = &threadContext->activeKeys;
|
||||||
gba.idleOptimization = threadContext->idleOptimization;
|
|
||||||
|
|
||||||
if (threadContext->startCallback) {
|
if (threadContext->startCallback) {
|
||||||
threadContext->startCallback(threadContext);
|
threadContext->startCallback(threadContext);
|
||||||
|
|
Loading…
Reference in New Issue