diff --git a/PlayCover/Model/AppSettings.swift b/PlayCover/Model/AppSettings.swift index 974c4b23c..d4064ca8b 100644 --- a/PlayCover/Model/AppSettings.swift +++ b/PlayCover/Model/AppSettings.swift @@ -26,6 +26,7 @@ struct AppSettingsData: Codable { var playChainDebugging = false var inverseScreenValues = false var metalHUD = false + var windowFixMethod = 0 init() {} @@ -50,6 +51,7 @@ struct AppSettingsData: Codable { playChainDebugging = try container.decodeIfPresent(Bool.self, forKey: .playChainDebugging) ?? false inverseScreenValues = try container.decodeIfPresent(Bool.self, forKey: .inverseScreenValues) ?? false metalHUD = try container.decodeIfPresent(Bool.self, forKey: .metalHUD) ?? false + windowFixMethod = try container.decodeIfPresent(Int.self, forKey: .windowFixMethod) ?? 0 } } diff --git a/PlayCover/Views/AppSettingsView.swift b/PlayCover/Views/AppSettingsView.swift index ef5a048a1..e1367f235 100644 --- a/PlayCover/Views/AppSettingsView.swift +++ b/PlayCover/Views/AppSettingsView.swift @@ -285,10 +285,25 @@ struct GraphicsView: View { Spacer() } } - HStack { + VStack(alignment: .leading) { if #available(macOS 13.2, *) { - Toggle("settings.toggle.windowExperimentalFix", isOn: $settings.settings.inverseScreenValues) - .help("settings.toggle.windowExperimentalFix.help") + HStack { + Toggle("settings.picker.windowFix", isOn: $settings.settings.inverseScreenValues) + .help("settings.picker.windowFix.help") + .onChange(of: settings.settings.inverseScreenValues) { _ in + settings.settings.windowFixMethod = 0 + } + Spacer() + // Dropdown to choose fix method + Picker("", selection: $settings.settings.windowFixMethod) { + Text("settings.picker.windowFixMethod.0").tag(0) + Text("settings.picker.windowFixMethod.1").tag(1) + } + .frame(alignment: .leading) + .help("settings.picker.windowFixMethod.help") + .disabled(!settings.settings.inverseScreenValues) + .disabled(settings.settings.resolution != 0) + } Spacer() } Toggle("settings.toggle.disableDisplaySleep", isOn: $settings.settings.disableTimeout) diff --git a/PlayCover/en.lproj/Localizable.strings b/PlayCover/en.lproj/Localizable.strings index 6bf423684..f5843b9a7 100644 --- a/PlayCover/en.lproj/Localizable.strings +++ b/PlayCover/en.lproj/Localizable.strings @@ -169,8 +169,10 @@ "settings.text.customWidth" = "Width"; "settings.text.detectedResolution" = "Detected Resolution:"; "settings.picker.aspectRatio" = "Aspect ratio:"; -"settings.toggle.windowExperimentalFix.help" = "Attempts to fix your app scene if you have problems with it"; -"settings.toggle.windowExperimentalFix" = "Fix window issues"; +"settings.picker.windowFix" = "Fix window display issues"; +"settings.picker.windowFix.help" = "Apply window fixes that may helps your apps display normally"; +"settings.picker.windowFixMethod.0" = "Normal"; +"settings.picker.windowFixMethod.1" = "Alternate"; "settings.toggle.disableDisplaySleep" = "Disable display sleep"; "settings.toggle.disableDisplaySleep.help" = "Prevent display from turning off while this app is running"; "settings.noPlayTools" = "PlayTools is not installed in this app";