From 9e45290c470290f9dceee90c68ffa2b6a6f9dcad Mon Sep 17 00:00:00 2001 From: rogerman Date: Wed, 20 Nov 2013 22:59:37 +0000 Subject: [PATCH] Cocoa Port: - Fix bug where the "Automatically load this ROM on startup" pop-up menu wouldn't update properly if the same option is chosen. --- desmume/src/cocoa/userinterface/preferencesWindowDelegate.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/desmume/src/cocoa/userinterface/preferencesWindowDelegate.mm b/desmume/src/cocoa/userinterface/preferencesWindowDelegate.mm index f06fe41ec..7001f6063 100644 --- a/desmume/src/cocoa/userinterface/preferencesWindowDelegate.mm +++ b/desmume/src/cocoa/userinterface/preferencesWindowDelegate.mm @@ -187,6 +187,11 @@ { [sheet orderOut:self]; + // Temporarily set the autoload ROM option in user defaults to some neutral value first and synchronize. + // When the user defaults are actually set later, this will force the proper state transitions to occur. + [[NSUserDefaults standardUserDefaults] setInteger:ROMAUTOLOADOPTION_CHOOSE_ROM forKey:@"General_AutoloadROMOption"]; + [[NSUserDefaults standardUserDefaults] synchronize]; + if (returnCode == NSCancelButton) { [[NSUserDefaults standardUserDefaults] setInteger:ROMAUTOLOADOPTION_LOAD_NONE forKey:@"General_AutoloadROMOption"];