From 062f54806c861166cf785fecfd402f78cd9694a3 Mon Sep 17 00:00:00 2001 From: rogerman Date: Wed, 8 Feb 2012 01:34:20 +0000 Subject: [PATCH] Cocoa Port: - There is a bug where if the user changes cheat items using the cheat list directly, the changes will not save to file. (However, any applied changes using Cheat Settings are saved to file as intended.) Workaround behavior: Save the cheat file upon ROM unloading. --- desmume/src/cocoa/userinterface/emuWindowDelegate.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/desmume/src/cocoa/userinterface/emuWindowDelegate.mm b/desmume/src/cocoa/userinterface/emuWindowDelegate.mm index 668138e95..085661e4b 100644 --- a/desmume/src/cocoa/userinterface/emuWindowDelegate.mm +++ b/desmume/src/cocoa/userinterface/emuWindowDelegate.mm @@ -1295,6 +1295,9 @@ currentEmuSaveStateURL = nil; [window setDocumentEdited:NO]; + // Save the ROM's cheat list before unloading. + [[self cdsCheats] save]; + // Update the UI to indicate that the ROM has started the process of unloading. [self setStatus:NSSTRING_STATUS_ROM_UNLOADING]; [romInfoPanelController setContent:[CocoaDSRom romNotLoadedBindings]];