diff --git a/Natives/LauncherMenuViewController.m b/Natives/LauncherMenuViewController.m index 284a823d..50b7e47a 100644 --- a/Natives/LauncherMenuViewController.m +++ b/Natives/LauncherMenuViewController.m @@ -306,7 +306,7 @@ [self displayProgress:nil]; } else { NSLog(@"[AltKit] Could not enable JIT compilation. %@", error); - [self displayProgress:[NSString stringWithFormat:localize(@"login.jit.fail.AltKit", nil), error]]; + [self displayProgress:[NSString stringWithFormat:localize(@"login.jit.fail.AltKit", nil), error.description]]; [self displayProgress:nil]; showDialog(self, localize(@"Error", nil), error.description); } diff --git a/Natives/LauncherPreferences.m b/Natives/LauncherPreferences.m index cf6924d2..59562419 100644 --- a/Natives/LauncherPreferences.m +++ b/Natives/LauncherPreferences.m @@ -148,6 +148,7 @@ void loadPreferences(BOOL reset) { setDefaultValueForPref(prefDict, @"check_sha", @YES); setDefaultValueForPref(prefDict, @"auto_ram", @(!getEntitlementValue(@"com.apple.private.memorystatus"))); setDefaultValueForPref(prefDict, @"unsupported_warn_counter", @(0)); + setDefaultValueForPref(prefDict, @"hidden_sidebar", @YES); // Debug settings setDefaultValueForPref(debugPrefDict, @"debug_skip_wait_jit", @NO); diff --git a/Natives/LauncherPreferencesViewController.m b/Natives/LauncherPreferencesViewController.m index 6e382cb4..59e3668f 100644 --- a/Natives/LauncherPreferencesViewController.m +++ b/Natives/LauncherPreferencesViewController.m @@ -120,6 +120,12 @@ typedef void(^CreateView)(UITableViewCell *, NSString *, NSDictionary *); localize(@"preference.title.appicon-dark", nil) ] }, + @{@"key": @"hidden_sidebar", + @"hasDetail": @YES, + @"icon": @"sidebar.leading", + @"type": self.typeSwitch, + @"enableCondition": whenNotInGame + }, @{@"key": @"reset_warnings", @"icon": @"exclamationmark.triangle", @"type": self.typeButton, diff --git a/Natives/LauncherSplitViewController.m b/Natives/LauncherSplitViewController.m index 939d1f18..ba3cb56f 100644 --- a/Natives/LauncherSplitViewController.m +++ b/Natives/LauncherSplitViewController.m @@ -27,6 +27,8 @@ extern NSMutableDictionary *prefDict; self.viewControllers = @[masterVc, detailVc]; [self changeDisplayModeForSize:self.view.frame.size]; + + self.maximumPrimaryColumnWidth = self.view.bounds.size.width * 0.95; } - (void)splitViewController:(UISplitViewController *)svc willChangeToDisplayMode:(UISplitViewControllerDisplayMode)displayMode { @@ -46,10 +48,18 @@ extern NSMutableDictionary *prefDict; - (void)changeDisplayModeForSize:(CGSize)size { BOOL isPortrait = size.height > size.width; if (self.preferredDisplayMode == 0 || self.displayMode != UISplitViewControllerDisplayModeSecondaryOnly) { - self.preferredDisplayMode = UISplitViewControllerDisplayModeSecondaryOnly; + if([getPreference(@"hidden_sidebar") boolValue] == NO) { + self.preferredDisplayMode = isPortrait ? + UISplitViewControllerDisplayModeOneOverSecondary : + UISplitViewControllerDisplayModeOneBesideSecondary; + } else { + self.preferredDisplayMode = UISplitViewControllerDisplayModeSecondaryOnly; + } } if (@available(iOS 14.0, tvOS 14.0, *)) { - self.preferredSplitBehavior = UISplitViewControllerSplitBehaviorOverlay; + self.preferredSplitBehavior = isPortrait ? + UISplitViewControllerSplitBehaviorOverlay : + UISplitViewControllerSplitBehaviorTile; } } diff --git a/Natives/resources/Assets.car b/Natives/resources/Assets.car index 154ac9d6..5ccd4daa 100644 Binary files a/Natives/resources/Assets.car and b/Natives/resources/Assets.car differ