mirror of https://github.com/bsnes-emu/bsnes.git
25 lines
565 B
Objective-C
25 lines
565 B
Objective-C
#import "AppDelegate.h"
|
|
|
|
@interface AppDelegate ()
|
|
|
|
@end
|
|
|
|
@implementation AppDelegate
|
|
|
|
- (IBAction)toggleDeveloperMode:(id)sender {
|
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
|
[defaults setBool:![defaults boolForKey:@"DeveloperMode"] forKey:@"DeveloperMode"];
|
|
}
|
|
|
|
- (BOOL)validateMenuItem:(NSMenuItem *)anItem
|
|
{
|
|
if ([anItem action] == @selector(toggleDeveloperMode:)) {
|
|
[(NSMenuItem*)anItem setState:[[NSUserDefaults standardUserDefaults] boolForKey:@"DeveloperMode"]];
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
@end
|