mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-09-02 00:32:56 +02:00
Prevent the "Mute" menu item from being incorrectly displayed as marked while paused
This commit is contained in:
@@ -1250,8 +1250,13 @@ static bool is_path_writeable(const char *path)
|
||||
- (BOOL)validateUserInterfaceItem:(id<NSValidatedUserInterfaceItem>)anItem
|
||||
{
|
||||
if ([anItem action] == @selector(mute:)) {
|
||||
if (_running) {
|
||||
[(NSMenuItem *)anItem setState:!_audioClient.isPlaying];
|
||||
}
|
||||
else {
|
||||
[(NSMenuItem *)anItem setState:[[NSUserDefaults standardUserDefaults] boolForKey:@"Mute"]];
|
||||
}
|
||||
}
|
||||
else if ([anItem action] == @selector(togglePause:)) {
|
||||
[(NSMenuItem *)anItem setState:self.isPaused];
|
||||
return !GB_debugger_is_stopped(&_gb);
|
||||
|
Reference in New Issue
Block a user