From b396fef7c26349f7d34a868fed1afbecce2341a2 Mon Sep 17 00:00:00 2001 From: Eilionoir Tunnicliff Date: Fri, 21 Apr 2023 14:22:38 -0400 Subject: [PATCH] Disable Zink on iOS 16 and later with release builds Don't want users switching to Zink and asking why it's broken. Temporary measure until we can get our copy updated and working --- Natives/LauncherPreferencesViewController.m | 50 ++++++++++++++------ Natives/en.lproj/Localizable.strings | 2 +- Natives/resources/Assets.car | Bin 9232352 -> 9232352 bytes 3 files changed, 37 insertions(+), 15 deletions(-) diff --git a/Natives/LauncherPreferencesViewController.m b/Natives/LauncherPreferencesViewController.m index e5ddfdda2c..c40c36fcb7 100644 --- a/Natives/LauncherPreferencesViewController.m +++ b/Natives/LauncherPreferencesViewController.m @@ -21,7 +21,7 @@ typedef void(^CreateView)(UITableViewCell *, NSString *, NSDictionary *); @interface LauncherPreferencesViewController(){} -@property(nonatomic) NSArray* prefSections; +@property(nonatomic) NSArray* prefSections, *rendererKeys, *rendererList; @property(nonatomic) NSMutableArray* prefSectionsVisibility; @property(nonatomic) NSArray*>* prefContents; @property(nonatomic) BOOL prefDetailVisible; @@ -60,6 +60,37 @@ - (void)viewDidLoad for (int i = 0; i < self.prefSections.count; i++) { [self.prefSectionsVisibility addObject:@NO]; } + +#if CONFIG_RELEASE + if(@available(iOS 16.0, *)) { + // Disabling Zink on iOS 16.0+ to figure out what's wrong with it + self.rendererKeys = @[ + @"auto", + @ RENDERER_NAME_GL4ES, + @ RENDERER_NAME_MTL_ANGLE + ]; + self.rendererList = @[ + localize(@"preference.title.renderer.auto", nil), + localize(@"preference.title.renderer.gl4es", nil), + localize(@"preference.title.renderer.angle", nil) + ]; + } else { +#endif + self.rendererKeys = @[ + @"auto", + @ RENDERER_NAME_GL4ES, + @ RENDERER_NAME_MTL_ANGLE, + @ RENDERER_NAME_VK_ZINK + ]; + self.rendererList = @[ + localize(@"preference.title.renderer.auto", nil), + localize(@"preference.title.renderer.gl4es", nil), + localize(@"preference.title.renderer.angle", nil), + localize(@"preference.title.renderer.zink", nil) + ]; +#if CONFIG_RELEASE + } +#endif self.prefContents = @[ @[ @@ -92,7 +123,7 @@ - (void)viewDidLoad @"type": self.typeSwitch, @"action": ^(BOOL enabled){ debugLogEnabled = enabled; - NSLog(@"Debug log enabled: %@", enabled ? @"YES" : @"NO"); + NSLog(@"[Debugging] Debug log enabled: %@", enabled ? @"YES" : @"NO"); } }, @{@"key": @"jitstreamer_server", @@ -190,21 +221,12 @@ - (void)viewDidLoad // Video and renderer settings @{@"icon": @"video"}, @{@"key": @"renderer", + @"hasDetail": @YES, @"icon": @"cpu", @"type": self.typePickField, @"enableCondition": whenNotInGame, - @"pickKeys": @[ - @"auto", - @ RENDERER_NAME_GL4ES, - @ RENDERER_NAME_MTL_ANGLE, - @ RENDERER_NAME_VK_ZINK - ], - @"pickList": @[ - localize(@"preference.title.renderer.auto", nil), - localize(@"preference.title.renderer.gl4es", nil), - localize(@"preference.title.renderer.angle", nil), - localize(@"preference.title.renderer.zink", nil) - ] + @"pickKeys": self.rendererKeys, + @"pickList": self.rendererList }, @{@"key": @"resolution", @"hasDetail": @YES, diff --git a/Natives/en.lproj/Localizable.strings b/Natives/en.lproj/Localizable.strings index 017d42c41b..4d53cb0966 100644 --- a/Natives/en.lproj/Localizable.strings +++ b/Natives/en.lproj/Localizable.strings @@ -165,7 +165,7 @@ "preference.title.renderer.gl4es" = "holy gl4es - exports OpenGL 2.1"; "preference.title.renderer.angle" = "ANGLE (1.17+) - exports OpenGL 3.2 (Core Profile, limited)"; "preference.title.renderer.zink" = "Zink (Mesa 21.0) - exports OpenGL 4.1"; -"preference.detail.renderer" = "Change the OpenGL render engine to use"; +"preference.detail.renderer" = "Change the OpenGL render engine to use. Zink is temporarily disabled on iOS 16 and later to diagnose issues."; "preference.title.resolution" = "Resolution (%)"; "preference.detail.resolution" = "Allows you to decrease the game resolution."; diff --git a/Natives/resources/Assets.car b/Natives/resources/Assets.car index 13a3e2519e52ff9871cb9b2e35d0b58019d2f648..70e40a7f7f076b80da80d573f07e17d2319233c2 100644 GIT binary patch delta 686 zcmaLVOIOSR00r>>B&Np<4dof8$RksYXPQCYq4HLVQsn(ABzY_3F}v|W>g1dj7M7M; z+BF}bg^%E8?^yiKJ?HN3IXCxxGC#-okLqY~5Cla;iA+??geH>H|Ir%Cj;9jYNV+sT zol1_z(_`^;h&<+y&s^parhr07z;I&I2BZ~ zhP70&j`eI{Bh_poK@GLkkz_Ml*vdAxvx9ne(m;y8TX(UWJv6eHeeCA|2RX!HnmEEy zj?qjDtsLhBCppDw&Ty7WI Sv8magnYx01^od`Yui-xr4#`#k delta 686 zcmaLVNmq>l00!XiCT^-r*O;*{5^^areiseOT*d|p88go_2~o=3-F`?N&S_!MvZa=G z`T-VxfJKkJWAU8#oOk!0^G=O_$(>?kq9Tz9f}oHB@<&U5#zw0q|D!3E9f?xeKT%nB zG79^`^gx)7k;4pfnaM2T9aKp_;91V>>(8$u1)PZr#lu_EJMFb=0$u1{&GV0S)hZbx46w6?sAX& zJm4XZc+3-?@{H%a;3cnkO%HGA;Xx8Y