git.y1.nz

SameBoy

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

commit 239e0462c3f0c48ec8d83752fc05e0e1ba772746
parent 8505f00cdfd28ea1cb7b55763078a353aabe9ef0
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Sat, 12 Jul 2025 01:22:58 +0300

Use proper hooks

Diffstat:
MiOS/GBViewController.m12+++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/iOS/GBViewController.m b/iOS/GBViewController.m @@ -2125,8 +2125,9 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response /* +[UIColor labelColor] is broken in some contexts in iOS 26 and despite being such a critical method Apple isn't going to fix this in time. */ +API_AVAILABLE(ios(19.0)) @implementation UIColor(SolariumBugs) -+ (UIColor *)labelColor ++ (UIColor *)_labelColor { return [UIColor colorWithDynamicProvider:^UIColor *(UITraitCollection *traitCollection) { switch (traitCollection.userInterfaceStyle) { @@ -2139,4 +2140,13 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response } }]; } + ++ (void)load +{ + if (@available(iOS 19.0, *)) { + method_setImplementation(class_getClassMethod(self, @selector(labelColor)), + [self methodForSelector:@selector(_labelColor)]); + } +} + @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.