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,7 +1250,12 @@ static bool is_path_writeable(const char *path)
|
|||||||
- (BOOL)validateUserInterfaceItem:(id<NSValidatedUserInterfaceItem>)anItem
|
- (BOOL)validateUserInterfaceItem:(id<NSValidatedUserInterfaceItem>)anItem
|
||||||
{
|
{
|
||||||
if ([anItem action] == @selector(mute:)) {
|
if ([anItem action] == @selector(mute:)) {
|
||||||
[(NSMenuItem *)anItem setState:!_audioClient.isPlaying];
|
if (_running) {
|
||||||
|
[(NSMenuItem *)anItem setState:!_audioClient.isPlaying];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
[(NSMenuItem *)anItem setState:[[NSUserDefaults standardUserDefaults] boolForKey:@"Mute"]];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if ([anItem action] == @selector(togglePause:)) {
|
else if ([anItem action] == @selector(togglePause:)) {
|
||||||
[(NSMenuItem *)anItem setState:self.isPaused];
|
[(NSMenuItem *)anItem setState:self.isPaused];
|
||||||
|
Reference in New Issue
Block a user