diff --git a/desmume/src/cocoa/cocoa_core.mm b/desmume/src/cocoa/cocoa_core.mm index 3970ce2d2..613cc22f9 100644 --- a/desmume/src/cocoa/cocoa_core.mm +++ b/desmume/src/cocoa/cocoa_core.mm @@ -26,6 +26,7 @@ #include #include +#include "../addons.h" #include "../NDSSystem.h" #undef BOOL @@ -165,6 +166,8 @@ static BOOL isCoreStarted = NO; return isCoreStarted; } + addonsChangePak(NDS_ADDON_NONE); + result = NDS_Init(); if (result == -1) { @@ -665,6 +668,7 @@ static void* RunCoreThread(void *arg) if (param->exitThread) { + pthread_mutex_unlock(¶m->mutexThreadExecute); break; } @@ -716,10 +720,7 @@ static void* RunCoreThread(void *arg) pthread_mutex_unlock(¶m->mutexThreadExecute); // If there is any time left in the loop, go ahead and pad it. - if(timeBudget > (mach_absolute_time() - startTime)) - { - mach_wait_until(startTime + timeBudget); - } + mach_wait_until(startTime + timeBudget); } while (!param->exitThread);