From 2a85d684ebec6c4eea6e0a0fee9955ca5313607d Mon Sep 17 00:00:00 2001 From: rogerman Date: Sat, 8 Feb 2014 03:32:45 +0000 Subject: [PATCH] Cocoa Port: - Disable replay related UI elements whenever a ROM is not loaded or if the save state sheet is shown. --- .../userinterface/EmuControllerDelegate.mm | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/desmume/src/cocoa/userinterface/EmuControllerDelegate.mm b/desmume/src/cocoa/userinterface/EmuControllerDelegate.mm index db9e9997c..f4803e147 100644 --- a/desmume/src/cocoa/userinterface/EmuControllerDelegate.mm +++ b/desmume/src/cocoa/userinterface/EmuControllerDelegate.mm @@ -2344,6 +2344,27 @@ } } } + else if (theAction == @selector(openReplay:)) + { + if ([self currentRom] == nil || [self isRomLoading] || [self isShowingSaveStateDialog]) + { + enable = NO; + } + } + else if (theAction == @selector(recordReplay:)) + { + if ([self currentRom] == nil || [self isRomLoading] || [self isShowingSaveStateDialog]) + { + enable = NO; + } + } + else if (theAction == @selector(stopReplay:)) + { + if ([self currentRom] == nil || [self isRomLoading] || [self isShowingSaveStateDialog]) + { + enable = NO; + } + } else if (theAction == @selector(changeCoreSpeed:)) { NSInteger speedScalar = (NSInteger)([cdsCore speedScalar] * 100.0);