SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 282140822e5b880447ce8bc3bdd2df2180b37a07 parent 19a1e3ec1af52b33ebc468c5f76e833099a57181 Author: Lior Halphon <LIJI32@gmail.com> Date: Tue, 10 Jun 2025 00:22:14 +0300 Fix compatibility issues with macOS 26 NIB loading Diffstat:
| M | Cocoa/GBJoyConManager.m | 12 | +++++++++++- |
| M | Cocoa/GBPaletteEditorController.m | 10 | ++++++++-- |
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/Cocoa/GBJoyConManager.m b/Cocoa/GBJoyConManager.m @@ -16,7 +16,7 @@ static GBJoyConManager *manager = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ - manager = [[self alloc] _init]; + manager = [[super allocWithZone:nil] _init]; }); return manager; } @@ -32,6 +32,16 @@ return ret; } ++ (instancetype)allocWithZone:(struct _NSZone *)zone +{ + return [self sharedInstance]; +} + ++ (instancetype)alloc +{ + return [self sharedInstance]; +} + - (instancetype)init { return [self.class sharedInstance]; diff --git a/Cocoa/GBPaletteEditorController.m b/Cocoa/GBPaletteEditorController.m @@ -399,10 +399,16 @@ static double blend(double from, double to, double position) [sender.window.sheetParent endSheet:sender.window]; } -- (instancetype)init ++ (instancetype)alloc { static id singleton = nil; if (singleton) return singleton; - return (singleton = [super init]); + return (singleton = [super allocWithZone:nil]); } + ++ (instancetype)allocWithZone:(struct _NSZone *)zone +{ + return [self alloc]; +} + @end
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.