From 5f44858eddde326dfc433c758ab11b6c386a557c Mon Sep 17 00:00:00 2001 From: rogerman Date: Thu, 21 Nov 2013 20:41:54 +0000 Subject: [PATCH] Cocoa Port: - Fix bug where SPU settings were not properly being set. (Regression from r4882.) --- desmume/src/cocoa/cocoa_output.mm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/desmume/src/cocoa/cocoa_output.mm b/desmume/src/cocoa/cocoa_output.mm index 68b4083a8..c08df1cb6 100644 --- a/desmume/src/cocoa/cocoa_output.mm +++ b/desmume/src/cocoa/cocoa_output.mm @@ -264,10 +264,9 @@ [property setValue:[NSNumber numberWithInteger:modeID] forKey:@"spuSyncMode"]; OSSpinLockUnlock(&spinlockSpuSyncMode); - NSInteger methodID = [self spuSyncMethod]; - pthread_mutex_lock(self.mutexProducer); - SPU_SetSynchMode(modeID, methodID); + CommonSettings.SPU_sync_mode = (int)modeID; + SPU_SetSynchMode(CommonSettings.SPU_sync_mode, CommonSettings.SPU_sync_method); pthread_mutex_unlock(self.mutexProducer); } @@ -286,10 +285,9 @@ [property setValue:[NSNumber numberWithInteger:methodID] forKey:@"spuSyncMethod"]; OSSpinLockUnlock(&spinlockSpuSyncMethod); - NSInteger modeID = [self spuSyncMode]; - pthread_mutex_lock(self.mutexProducer); - SPU_SetSynchMode(modeID, methodID); + CommonSettings.SPU_sync_method = (int)methodID; + SPU_SetSynchMode(CommonSettings.SPU_sync_mode, CommonSettings.SPU_sync_method); pthread_mutex_unlock(self.mutexProducer); }