git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

commit 430e42fa72726cd4561b0a4e62bd0172d553791e
parent c7c54abb6b05568b21a674fbbd0476adc4fa7944
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Sun, 25 Aug 2024 18:03:01 +0300

Prevent the "Mute" menu item from being incorrectly displayed as marked while paused

Diffstat:
MCocoa/Document.m7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Cocoa/Document.m b/Cocoa/Document.m @@ -1250,7 +1250,12 @@ static bool is_path_writeable(const char *path) - (BOOL)validateUserInterfaceItem:(id<NSValidatedUserInterfaceItem>)anItem { 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:)) { [(NSMenuItem *)anItem setState:self.isPaused];

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.