diff --git a/src/MeloNX/MeloNX.xcodeproj/project.pbxproj b/src/MeloNX/MeloNX.xcodeproj/project.pbxproj index 810fdc7c8..fcccb2b19 100644 --- a/src/MeloNX/MeloNX.xcodeproj/project.pbxproj +++ b/src/MeloNX/MeloNX.xcodeproj/project.pbxproj @@ -687,7 +687,7 @@ INFOPLIST_KEY_UIRequiresFullScreen = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; INFOPLIST_KEY_UISupportsDocumentBrowser = YES; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -829,7 +829,7 @@ INFOPLIST_KEY_UIRequiresFullScreen = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; INFOPLIST_KEY_UISupportsDocumentBrowser = YES; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/src/MeloNX/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/stossy11.xcuserdatad/UserInterfaceState.xcuserstate b/src/MeloNX/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/stossy11.xcuserdatad/UserInterfaceState.xcuserstate index 8132f3bc6..e66740c97 100644 Binary files a/src/MeloNX/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/stossy11.xcuserdatad/UserInterfaceState.xcuserstate and b/src/MeloNX/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/stossy11.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/src/MeloNX/MeloNX/App/Views/ContentView.swift b/src/MeloNX/MeloNX/App/Views/ContentView.swift index 9741c208a..cce781157 100644 --- a/src/MeloNX/MeloNX/App/Views/ContentView.swift +++ b/src/MeloNX/MeloNX/App/Views/ContentView.swift @@ -95,7 +95,6 @@ struct ContentView: View { } } else { EmulationView() - .persistentSystemOverlays(.hidden) .onAppear() { isAnimating = false } diff --git a/src/MeloNX/MeloNX/App/Views/SettingsView/SettingsView.swift b/src/MeloNX/MeloNX/App/Views/SettingsView/SettingsView.swift index f2dc83bac..c1e9146ca 100644 --- a/src/MeloNX/MeloNX/App/Views/SettingsView/SettingsView.swift +++ b/src/MeloNX/MeloNX/App/Views/SettingsView/SettingsView.swift @@ -514,12 +514,25 @@ struct SettingsView: View { // Info Section { let totalMemory = ProcessInfo.processInfo.physicalMemory + let model = getDeviceModel() + let deviceType = model.hasPrefix("iPad") ? "iPadOS" : + model.hasPrefix("iPhone") ? "iOS" : + "macOS" + + let iconName = model.hasPrefix("iPad") ? "ipad.landscape" : + model.hasPrefix("iPhone") ? "iphone" : + "macwindow" labelWithIcon("JIT Acquisition: \(isJITEnabled() ? "Acquired" : "Not Acquired" )", iconName: "bolt.fill") labelWithIcon("Increased Memory Limit Entitlement: \(checkAppEntitlement("com.apple.developer.kernel.increased-memory-limit") ? "Enabled" : "Disabled")", iconName: "memorychip") + labelWithIcon("Device: \(getDeviceModel())", iconName: iconName) + labelWithIcon("Device Memory: \(String(format: "%.0f GB", Double(totalMemory) / 1_000_000_000))", iconName: "memorychip.fill") + + labelWithIcon("\(deviceType) \(UIDevice.current.systemVersion)", iconName: "applelogo") + } header: { Text("Information") .font(.title3.weight(.semibold)) @@ -531,10 +544,12 @@ struct SettingsView: View { // Advanced Section { + /* Toggle(isOn: $windowCode) { labelWithIcon("SDL Window", iconName: "macwindow.on.rectangle") } .tint(.blue) + */ DisclosureGroup { @@ -602,6 +617,8 @@ struct SettingsView: View { if let configs = loadSettings() { self.config = configs } + + windowCode = false } .onChange(of: config) { _ in saveSettings() @@ -618,6 +635,18 @@ struct SettingsView: View { } } + func getDeviceModel() -> String { + var systemInfo = utsname() + uname(&systemInfo) + let machineMirror = Mirror(reflecting: systemInfo.machine) + let identifier = machineMirror.children.reduce("") { identifier, element in + guard let value = element.value as? Int8, value != 0 else { return identifier } + return identifier + String(UnicodeScalar(UInt8(value))) + } + return identifier + } + + func saveSettings() { #if targetEnvironment(simulator) diff --git a/src/MeloNX/MeloNX/App/Views/Updates/GameDLCManagerSheet.swift b/src/MeloNX/MeloNX/App/Views/Updates/GameDLCManagerSheet.swift index 817a8be81..5e751dd48 100644 --- a/src/MeloNX/MeloNX/App/Views/Updates/GameDLCManagerSheet.swift +++ b/src/MeloNX/MeloNX/App/Views/Updates/GameDLCManagerSheet.swift @@ -157,3 +157,12 @@ private extension DLCManagerSheet { URL.documentsDirectory.appendingPathComponent("games").appendingPathComponent(game.titleId).appendingPathComponent("dlc.json") } } + + +extension URL { + @available(iOS, introduced: 15.0, deprecated: 16.0, message: "Use URL.documentsDirectory on iOS 16 and above") + static var documentsDirectory: URL { + let documentDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first! + return documentDirectory + } +}