diff --git a/src/MeloNX/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/brandon.xcuserdatad/UserInterfaceState.xcuserstate b/src/MeloNX/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/brandon.xcuserdatad/UserInterfaceState.xcuserstate index 3d64b9a24..80e56901d 100644 Binary files a/src/MeloNX/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/brandon.xcuserdatad/UserInterfaceState.xcuserstate and b/src/MeloNX/MeloNX.xcodeproj/project.xcworkspace/xcuserdata/brandon.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/src/MeloNX/MeloNX.xcodeproj/xcuserdata/brandon.xcuserdatad/xcschemes/xcschememanagement.plist b/src/MeloNX/MeloNX.xcodeproj/xcuserdata/brandon.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 000000000..4873d94b7 --- /dev/null +++ b/src/MeloNX/MeloNX.xcodeproj/xcuserdata/brandon.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,24 @@ + + + + + SchemeUserState + + MeloNX.xcscheme_^#shared#^_ + + orderHint + 0 + + Ryujinx.xcscheme_^#shared#^_ + + orderHint + 4 + + com.Stossy11.MeloNX.RyujinxAg.xcscheme_^#shared#^_ + + orderHint + 3 + + + + diff --git a/src/MeloNX/MeloNX/App/Core/Ryujinx/Ryujinx.swift b/src/MeloNX/MeloNX/App/Core/Ryujinx/Ryujinx.swift index f15137eb8..dbfb950d7 100644 --- a/src/MeloNX/MeloNX/App/Core/Ryujinx/Ryujinx.swift +++ b/src/MeloNX/MeloNX/App/Core/Ryujinx/Ryujinx.swift @@ -56,6 +56,11 @@ class Ryujinx { var disableDockedMode: Bool var enableTextureRecompression: Bool var additionalArgs: [String] + var maxAnisotropy: Float + var macroHLE: Bool + var ignoreMissingServices: Bool + var expandRam: Bool + init(gamepath: String, @@ -72,7 +77,10 @@ class Ryujinx { enableTextureRecompression: Bool = true, additionalArgs: [String] = [], resscale: Float = 1.00, - hypervisor: Bool = false + maxAnisotropy: Float = 0, + macroHLE: Bool = false, + ignoreMissingServices: Bool = false, + expandRam: Bool = false ) { self.gamepath = gamepath self.inputids = inputids @@ -88,7 +96,10 @@ class Ryujinx { self.resscale = resscale self.nintendoinput = nintendoinput self.enableInternet = enableInternet - self.hypervisor = hypervisor + self.maxAnisotropy = maxAnisotropy + self.macroHLE = macroHLE + self.expandRam = expandRam + self.ignoreMissingServices = ignoreMissingServices } } @@ -182,6 +193,22 @@ class Ryujinx { args.append(contentsOf: ["--resolution-scale", String(config.resscale)]) } + if config.expandRam { + args.append(contentsOf: ["--expand-ram", String(config.maxAnisotropy)]) + } + + if config.ignoreMissingServices { + args.append(contentsOf: ["--ignore-missing-services", String(config.maxAnisotropy)]) + } + + if config.maxAnisotropy != 0 { + args.append(contentsOf: ["--max-anisotropy", String(config.maxAnisotropy)]) + } + + if !config.macroHLE { + args.append("--disable-macro-hle") + } + if !config.disableShaderCache { // same with disableShaderCache args.append("--disable-shader-cache") } diff --git a/src/MeloNX/MeloNX/App/Views/SettingsView/SettingsView.swift b/src/MeloNX/MeloNX/App/Views/SettingsView/SettingsView.swift index 7155ddd0f..3e4de4e95 100644 --- a/src/MeloNX/MeloNX/App/Views/SettingsView/SettingsView.swift +++ b/src/MeloNX/MeloNX/App/Views/SettingsView/SettingsView.swift @@ -32,6 +32,7 @@ struct SettingsView: View { @AppStorage("performacehud") var performacehud: Bool = false @State private var showResolutionInfo = false + @State private var showAnisotropicInfo = false @State private var searchText = "" var filteredMemoryModes: [(String, String)] { @@ -67,6 +68,10 @@ struct SettingsView: View { } .tint(.blue) + Toggle(isOn: $config.macroHLE) { + labelWithIcon("Macro HLE", iconName: "gearshape") + }.tint(.blue) + VStack(alignment: .leading, spacing: 10) { @@ -109,6 +114,46 @@ struct SettingsView: View { } .padding(.vertical, 8) + VStack(alignment: .leading, spacing: 10) { + HStack { + labelWithIcon("Max Anisotropic Scale", iconName: "magnifyingglass") + .font(.headline) + Spacer() + Button { + showAnisotropicInfo.toggle() + } label: { + Image(systemName: "info.circle") + .symbolRenderingMode(.hierarchical) + .foregroundStyle(.secondary) + } + .buttonStyle(.plain) + .help("Learn more about Max Anisotropic Scale") + .alert(isPresented: $showAnisotropicInfo) { + Alert( + title: Text("Max Anisotripic Scale"), + message: Text("Adjust the internal Anisotropic resolution. Higher values improve visuals but may reduce performance. Default at 0 lets game decide."), + dismissButton: .default(Text("OK")) + ) + } + } + + Slider(value: $config.maxAnisotropy, in: 0...16.0, step: 0.1) { + Text("Resolution Scale") + } minimumValueLabel: { + Text("0x") + .font(.footnote) + .foregroundColor(.secondary) + } maximumValueLabel: { + Text("16.0x") + .font(.footnote) + .foregroundColor(.secondary) + } + Text("\(config.maxAnisotropy, specifier: "%.2f")x") + .font(.subheadline) + .foregroundColor(.secondary) + } + .padding(.vertical, 8) + Toggle(isOn: $performacehud) { labelWithIcon("Performance Overlay", iconName: "speedometer") } @@ -229,28 +274,6 @@ struct SettingsView: View { labelWithIcon("Memory Manager Mode", iconName: "gearshape") } } - - if let cpuInfo = getCPUInfo(), cpuInfo.hasPrefix("Apple M") { - if #available (iOS 16.4, *), (false) { - Toggle(isOn: .constant(false)) { - labelWithIcon("Hypervisor", iconName: "bolt.fill") - } - .tint(.blue) - .disabled(true) - .onAppear() { - print("CPU Info: \(cpuInfo)") - } - } else { - Toggle(isOn: $config.hypervisor) { - labelWithIcon("Hypervisor", iconName: "bolt.fill") - } - .tint(.blue) - .onAppear() { - print("CPU Info: \(cpuInfo)") - - } - } - } } header: { Text("CPU Mode") .font(.title3.weight(.semibold)) @@ -259,8 +282,27 @@ struct SettingsView: View { } footer: { Text("Select how memory is managed. 'Host (fast)' is best for most users.") } + + + Section { + Toggle(isOn: $config.expandRam) { + labelWithIcon("Expand Guest Ram (6GB)", iconName: "exclamationmark.bubble") + } + .tint(.red) + + Toggle(isOn: $config.ignoreMissingServices) { + labelWithIcon("Ignore Missing Services", iconName: "waveform.path") + } + .tint(.red) + } header: { + Text("Hacks") + .font(.title3.weight(.semibold)) + .textCase(nil) + .headerProminence(.increased) + } + // Other Settings Section {