Prevent asking for notification permissions until used by an HuC-3 game
This commit is contained in:
parent
766529d7be
commit
5cffdbcd27
@ -51,7 +51,9 @@
|
||||
JOYHatsEmulateButtonsKey: @YES,
|
||||
}];
|
||||
|
||||
[NSUserNotificationCenter defaultUserNotificationCenter].delegate = self;
|
||||
if ([[NSUserDefaults standardUserDefaults] boolForKey:@"GBNotificationsUsed"]) {
|
||||
[NSUserNotificationCenter defaultUserNotificationCenter].delegate = self;
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)toggleDeveloperMode:(id)sender
|
||||
|
@ -404,6 +404,7 @@ static void rumbleCallback(GB_gameboy_t *gb, double amp)
|
||||
unsigned time_to_alarm = GB_time_to_alarm(&gb);
|
||||
|
||||
if (time_to_alarm) {
|
||||
[NSUserNotificationCenter defaultUserNotificationCenter].delegate = (id)[NSApp delegate];
|
||||
NSUserNotification *notification = [[NSUserNotification alloc] init];
|
||||
NSString *friendlyName = [[self.fileName lastPathComponent] stringByDeletingPathExtension];
|
||||
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"\\([^)]+\\)|\\[[^\\]]+\\]" options:0 error:nil];
|
||||
|
Loading…
Reference in New Issue
Block a user