From aa0fe30d5c67e01b184b53fc6e1a1d8c2fc0ecb8 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Fri, 11 Jul 2025 17:59:13 +0300 Subject: [PATCH] Don't update the icon after an update on macOS 26, it's broken --- Cocoa/GBApp.m | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Cocoa/GBApp.m b/Cocoa/GBApp.m index cf4e9b903..14bcc16b9 100644 --- a/Cocoa/GBApp.m +++ b/Cocoa/GBApp.m @@ -44,9 +44,14 @@ static uint32_t color_to_int(NSColor *color) - (void) applicationDidFinishLaunching:(NSNotification *)notification { // Refresh icon if launched via a software update - NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:[[NSBundle mainBundle] bundlePath]]; - icon.size = [NSApplication sharedApplication].applicationIconImage.size; - [NSApplication sharedApplication].applicationIconImage = icon; + if (@available(macOS 26.0, *)) { + // Severely broken on macOS 26 + } + else { + NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:[[NSBundle mainBundle] bundlePath]]; + icon.size = [NSApplication sharedApplication].applicationIconImage.size; + [NSApplication sharedApplication].applicationIconImage = icon; + } NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; for (unsigned i = 0; i < GBKeyboardButtonCount; i++) {