From 42ffbd18d01d7d3561c28d0502cd4fd025abbc8d Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Thu, 26 Jun 2025 20:57:47 +0300 Subject: [PATCH] Fix a bug where a GBS file will not correctly play the first track unless explicitly switching to it. Reloading a GBS file is disabled because it's not supported. --- Cocoa/Document.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Cocoa/Document.m b/Cocoa/Document.m index a3189cc..f12bc19 100644 --- a/Cocoa/Document.m +++ b/Cocoa/Document.m @@ -749,11 +749,12 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) if (old_width != GB_get_screen_width(&_gb)) { [self.view screenSizeChanged]; } - [self updateMinSize]; - [self start]; + if (_gbsTracks) { + [self changeGBSTrack:sender]; + } if (_hexController) { /* Verify bank sanity, especially when switching models. */ @@ -1445,6 +1446,9 @@ static bool is_path_writeable(const char *path) else if ([anItem action] == @selector(decreaseWindowSize:)) { return [self newRect:NULL forWindow:_mainWindow action:GBWindowResizeActionDecrease]; } + else if ([anItem action] == @selector(reloadROM:)) { + return !_gbsTracks; + } return [super validateUserInterfaceItem:anItem]; }