SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 8508eb7b7c07a9bf580b8cb2b4263040d45dfe86 parent 00000971d753e4868d8e02d30547380052952d36 Author: Lior Halphon <LIJI32@gmail.com> Date: Tue, 24 Jun 2025 22:44:39 +0300 Fix Mavericks regressions Diffstat:
| M | Cocoa/Document.xib | 12 | ++---------- |
| M | Cocoa/GBToolbarFieldCell.m | 9 | +++++++++ |
| M | Cocoa/NSTextFieldCell+Inset.m | 6 | +++++- |
3 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/Cocoa/Document.xib b/Cocoa/Document.xib @@ -406,13 +406,9 @@ <textField key="view" focusRingType="none" verticalHuggingPriority="750" id="rdV-q6-hc6"> <rect key="frame" x="0.0" y="14" width="64" height="22"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="NO" state="on" borderStyle="bezel" placeholderString="Bank" drawsBackground="YES" id="JCn-Y1-eHS" customClass="GBToolbarFieldCell"> + <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" state="on" borderStyle="bezel" placeholderString="Bank" drawsBackground="NO" id="JCn-Y1-eHS" customClass="GBToolbarFieldCell"> <font key="font" metaFont="system"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> - <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> - <userDefinedRuntimeAttributes> - <userDefinedRuntimeAttribute type="boolean" keyPath="sendsWholeSearchString" value="YES"/> - </userDefinedRuntimeAttributes> </textFieldCell> <connections> <action selector="hexUpdateBank:" target="-2" id="Mx9-WI-wgO"/> @@ -426,13 +422,9 @@ <textField key="view" focusRingType="none" verticalHuggingPriority="750" id="EJd-jG-hmH"> <rect key="frame" x="0.0" y="14" width="160" height="22"/> <autoresizingMask key="autoresizingMask" widthSizable="YES"/> - <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="NO" state="on" borderStyle="bezel" placeholderString="Address" bezelStyle="round" id="vg5-Nn-abb" customClass="GBToolbarFieldCell"> + <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" state="on" borderStyle="bezel" placeholderString="Address" bezelStyle="round" id="vg5-Nn-abb" customClass="GBToolbarFieldCell"> <font key="font" metaFont="system"/> <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> - <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> - <userDefinedRuntimeAttributes> - <userDefinedRuntimeAttribute type="boolean" keyPath="sendsWholeSearchString" value="YES"/> - </userDefinedRuntimeAttributes> </textFieldCell> <connections> <action selector="hexGoTo:" target="-2" id="7WG-8C-SK8"/> diff --git a/Cocoa/GBToolbarFieldCell.m b/Cocoa/GBToolbarFieldCell.m @@ -20,4 +20,13 @@ method_setImplementation(class_getInstanceMethod([GBToolbarFieldCell class], _cmd), imp); ((void(*)(id, SEL, id))imp)(self, _cmd, textObj); } + +// We only need this hack on Solarium, avoid regressions ++ (instancetype)allocWithZone:(struct _NSZone *)zone +{ + if (@available(macOS 26.0, *)) { + return [super allocWithZone:zone]; + } + return (id)[NSTextFieldCell allocWithZone:zone]; +} @end diff --git a/Cocoa/NSTextFieldCell+Inset.m b/Cocoa/NSTextFieldCell+Inset.m @@ -66,7 +66,11 @@ + (void)load { - method_exchangeImplementations(class_getInstanceMethod(self, @selector(wantsUpdateLayer)), + Method method = class_getInstanceMethod(self, @selector(wantsUpdateLayer)); + if (class_addMethod(self, @selector(wantsUpdateLayer), method_getImplementation(method), method_getTypeEncoding(method))) { + method = class_getInstanceMethod(self, @selector(wantsUpdateLayer)); + } + method_exchangeImplementations(method, class_getInstanceMethod(self, @selector(wantsUpdateLayerHook))); }
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.