diff --git a/Natives/Info.plist b/Natives/Info.plist index 349e0fea94..eb64f04a94 100644 --- a/Natives/Info.plist +++ b/Natives/Info.plist @@ -98,10 +98,6 @@ CFBundleVersion 3.0 - GCSupportsControllerUserInteraction - - UILaunchStoryboardName - LaunchScreen GCSupportedGameControllers @@ -109,6 +105,10 @@ ExtendedGamepad + GCSupportsControllerUserInteraction + + GCSupportsGameMode + LSApplicationQueriesSchemes filza @@ -169,6 +169,8 @@ UIFileSharingEnabled + UILaunchStoryboardName + LaunchScreen UIRequiredDeviceCapabilities arm64 diff --git a/Natives/LauncherPreferencesViewController.m b/Natives/LauncherPreferencesViewController.m index fe4d4ecb82..640b96ec72 100644 --- a/Natives/LauncherPreferencesViewController.m +++ b/Natives/LauncherPreferencesViewController.m @@ -68,6 +68,17 @@ - (void)viewDidLoad @"type": self.typeSwitch, @"enableCondition": whenNotInGame }, + @{@"key": @"game_mode", + @"hasDetail": @YES, + @"icon": @"gamecontroller", + @"type": self.typeSwitch, + @"enableCondition": whenNotInGame, + @"action": ^(BOOL enabled){ + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults setBool:enabled forKey:@"GCSupportsGameMode"]; + [defaults synchronize]; + } + }, @{@"key": @"debug_logging", @"hasDetail": @YES, @"icon": @"doc.badge.gearshape", diff --git a/Natives/PLPreferences.m b/Natives/PLPreferences.m index b7be3d52e9..167ce248db 100644 --- a/Natives/PLPreferences.m +++ b/Natives/PLPreferences.m @@ -16,6 +16,7 @@ + (id)defaultPrefForGlobal:(BOOL)global { @"check_sha": @YES, @"cosmetica": @YES, @"debug_logging": @(!CONFIG_RELEASE), + @"game_mode": @NO, }.mutableCopy, @"video": @{ // Video & Audio @"renderer": @"auto", diff --git a/Natives/resources/en.lproj/Localizable.strings b/Natives/resources/en.lproj/Localizable.strings index 0e41ea616a..1dcb2c16f4 100644 --- a/Natives/resources/en.lproj/Localizable.strings +++ b/Natives/resources/en.lproj/Localizable.strings @@ -149,6 +149,8 @@ "preference.detail.check_sha" = "This option forces launcher to check the file hash if it's available. Prevents broken downloads."; "preference.title.cosmetica" = "Cosmetica Capes"; "preference.detail.cosmetica" = "Enable capes from Cosmetica (previously Arc). For more information please visit https://cosmetica.cc. Requires OptiFine"; +"preference.title.game_mode" = "Game Mode"; +"preference.detail.game_mode" = "Enable Game Mode for enhanced gaming performance. This setting may not work on all devices and only works on devices on iOS/iPadOS 18 or higher."; "preference.title.debug_logging" = "Debug logging"; "preference.detail.debug_logging" = "Logs internal settings and actions to latestlog.txt. This helps the developers find issues easier, but Minecraft may run slower as the logs will be written to more often."; "preference.title.appicon" = "Set app icon";