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]];