diff --git a/MeloNX-hv.entitlements b/MeloNX-hv.entitlements
new file mode 100644
index 000000000..1f57e9242
--- /dev/null
+++ b/MeloNX-hv.entitlements
@@ -0,0 +1,46 @@
+
+
+
+ get-task-allow
+
+ com.apple.developer.kernel.increased-memory-limit
+
+ com.apple.developer.kernel.extended-virtual-addressing
+
+ com.apple.private.iokit.IOServiceSetAuthorizationID
+
+ com.apple.security.exception.iokit-user-client-class
+
+ AGXCommandQueue
+ AGXDevice
+ AGXDeviceUserClient
+ AGXSharedUserClient
+ AppleUSBHostDeviceUserClient
+ AppleUSBHostInterfaceUserClient
+ IOSurfaceRootUserClient
+ IOAccelContext
+ IOAccelContext2
+ IOAccelDevice
+ IOAccelDevice2
+ IOAccelSharedUserClient
+ IOAccelSharedUserClient2
+ IOAccelSubmitter2
+
+ com.apple.system.diagnostics.iokit-properties
+
+ com.apple.vm.device-access
+
+ com.apple.private.hypervisor
+
+ com.apple.private.memorystatus
+
+ com.apple.private.security.no-sandbox
+
+ com.apple.private.security.storage.AppDataContainers
+
+ com.apple.private.security.storage.MobileDocuments
+
+ platform-application
+
+
+
\ No newline at end of file
diff --git a/src/ARMeilleure/Translation/Cache/JitCache.cs b/src/ARMeilleure/Translation/Cache/JitCache.cs
index 486e860a3..9a088b84d 100644
--- a/src/ARMeilleure/Translation/Cache/JitCache.cs
+++ b/src/ARMeilleure/Translation/Cache/JitCache.cs
@@ -18,7 +18,7 @@ namespace ARMeilleure.Translation.Cache
private static readonly int _pageMask = _pageSize - 8;
private const int CodeAlignment = 4; // Bytes.
- private const int CacheSize = 2047 * 1024 * 1024;
+ private const int CacheSize = 128 * 1024 * 1024;
private const int CacheSizeIOS = 64 * 1024 * 1024;
private static ReservedRegion _jitRegion;
diff --git a/src/MeloNX/MeloNX.xcodeproj/project.pbxproj b/src/MeloNX/MeloNX.xcodeproj/project.pbxproj
index 07565e390..72f992edf 100644
--- a/src/MeloNX/MeloNX.xcodeproj/project.pbxproj
+++ b/src/MeloNX/MeloNX.xcodeproj/project.pbxproj
@@ -627,6 +627,7 @@
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
+ "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
);
GCC_OPTIMIZATION_LEVEL = fast;
GENERATE_INFOPLIST_FILE = YES;
@@ -863,6 +864,7 @@
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
"$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
+ "$(PROJECT_DIR)/MeloNX/Dependencies/Dynamic\\ Libraries",
);
GCC_OPTIMIZATION_LEVEL = fast;
GENERATE_INFOPLIST_FILE = YES;
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 86219cea6..461bcea24 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/Core/Ryujinx/Ryujinx.swift b/src/MeloNX/MeloNX/App/Core/Ryujinx/Ryujinx.swift
index 5d5c94c92..f15137eb8 100644
--- a/src/MeloNX/MeloNX/App/Core/Ryujinx/Ryujinx.swift
+++ b/src/MeloNX/MeloNX/App/Core/Ryujinx/Ryujinx.swift
@@ -52,6 +52,7 @@ class Ryujinx {
var fullscreen: Bool
var memoryManagerMode: String
var disableShaderCache: Bool
+ var hypervisor: Bool
var disableDockedMode: Bool
var enableTextureRecompression: Bool
var additionalArgs: [String]
@@ -63,14 +64,15 @@ class Ryujinx {
tracelogs: Bool = false,
listinputids: Bool = false,
fullscreen: Bool = false,
- memoryManagerMode: String = "HostMapped",
+ memoryManagerMode: String = "HostMappedUnsafe",
disableShaderCache: Bool = false,
disableDockedMode: Bool = false,
nintendoinput: Bool = true,
enableInternet: Bool = false,
enableTextureRecompression: Bool = true,
additionalArgs: [String] = [],
- resscale: Float = 1.00
+ resscale: Float = 1.00,
+ hypervisor: Bool = false
) {
self.gamepath = gamepath
self.inputids = inputids
@@ -86,6 +88,7 @@ class Ryujinx {
self.resscale = resscale
self.nintendoinput = nintendoinput
self.enableInternet = enableInternet
+ self.hypervisor = hypervisor
}
}
@@ -170,6 +173,10 @@ class Ryujinx {
// args.append("--disable-vsync")
+ if config.hypervisor {
+ args.append("--use-hypervisor")
+ }
+
if config.resscale != 1.0 {
args.append(contentsOf: ["--resolution-scale", String(config.resscale)])
diff --git a/src/MeloNX/MeloNX/App/Views/SettingsView/SettingsView.swift b/src/MeloNX/MeloNX/App/Views/SettingsView/SettingsView.swift
index aea9adb64..7155ddd0f 100644
--- a/src/MeloNX/MeloNX/App/Views/SettingsView/SettingsView.swift
+++ b/src/MeloNX/MeloNX/App/Views/SettingsView/SettingsView.swift
@@ -39,36 +39,36 @@ struct SettingsView: View {
return memoryManagerModes.filter { $0.1.localizedCaseInsensitiveContains(searchText) }
}
-
+
var body: some View {
iOSNav {
List {
-
-
+
+
// Graphics & Performance
Section {
Toggle(isOn: $config.fullscreen) {
labelWithIcon("Fullscreen", iconName: "rectangle.expand.vertical")
}
.tint(.blue)
-
+
Toggle(isOn: $config.disableShaderCache) {
labelWithIcon("Shader Cache", iconName: "memorychip")
}
.tint(.blue)
-
+
Toggle(isOn: $config.enableTextureRecompression) {
labelWithIcon("Texture Recompression", iconName: "rectangle.compress.vertical")
}
.tint(.blue)
-
+
Toggle(isOn: $config.disableDockedMode) {
labelWithIcon("Docked Mode", iconName: "dock.rectangle")
}
.tint(.blue)
-
+
VStack(alignment: .leading, spacing: 10) {
HStack {
labelWithIcon("Resolution Scale", iconName: "magnifyingglass")
@@ -91,7 +91,7 @@ struct SettingsView: View {
)
}
}
-
+
Slider(value: $config.resscale, in: 0.1...3.0, step: 0.1) {
Text("Resolution Scale")
} minimumValueLabel: {
@@ -108,7 +108,7 @@ struct SettingsView: View {
.foregroundColor(.secondary)
}
.padding(.vertical, 8)
-
+
Toggle(isOn: $performacehud) {
labelWithIcon("Performance Overlay", iconName: "speedometer")
}
@@ -192,7 +192,7 @@ struct SettingsView: View {
} footer: {
Text("Select input devices and on-screen controls to play with. ")
}
-
+
// Input Settings
Section {
@@ -200,7 +200,7 @@ struct SettingsView: View {
labelWithIcon("List Input IDs", iconName: "list.bullet")
}
.tint(.blue)
-
+
Toggle(isOn: $ryuDemo) {
labelWithIcon("On-Screen Controller (Demo)", iconName: "hand.draw")
}
@@ -229,6 +229,28 @@ 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))
@@ -237,8 +259,8 @@ struct SettingsView: View {
} footer: {
Text("Select how memory is managed. 'Host (fast)' is best for most users.")
}
-
-
+
+
// Other Settings
Section {
@@ -251,7 +273,7 @@ struct SettingsView: View {
labelWithIcon("Debug Logs", iconName: "exclamationmark.bubble")
}
.tint(.blue)
-
+
Toggle(isOn: $config.tracelogs) {
labelWithIcon("Trace Logs", iconName: "waveform.path")
}
@@ -264,11 +286,11 @@ struct SettingsView: View {
} footer: {
Text("Enable logs for troubleshooting and Enable automatic TrollStore JIT.")
}
-
+
// Advanced
Section {
DisclosureGroup {
-
+
HStack {
labelWithIcon("Page Size", iconName: "textformat.size")
Spacer()
@@ -276,7 +298,7 @@ struct SettingsView: View {
.foregroundColor(.secondary)
}
-
+
TextField("Additional Arguments", text: Binding(
get: {
config.additionalArgs.joined(separator: " ")
@@ -352,6 +374,15 @@ struct SettingsView: View {
#endif
}
+ func getCPUInfo() -> String? {
+ let device = MTLCreateSystemDefaultDevice()
+
+ let gpu = device?.name
+ print("GPU: " + (gpu ?? ""))
+ return gpu
+ }
+
+
// Original loadSettings function assumed to exist
func loadSettings() -> Ryujinx.Configuration? {
diff --git a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/Hypervisor.framework/Hypervisor b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/Hypervisor.framework/Hypervisor
new file mode 100755
index 000000000..64a12a7eb
Binary files /dev/null and b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/Hypervisor.framework/Hypervisor differ
diff --git a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/Hypervisor.framework/Info.plist b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/Hypervisor.framework/Info.plist
new file mode 100644
index 000000000..4f6e6b3b8
Binary files /dev/null and b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/Hypervisor.framework/Info.plist differ
diff --git a/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/Hypervisor.framework/_CodeSignature/CodeResources b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/Hypervisor.framework/_CodeSignature/CodeResources
new file mode 100644
index 000000000..28a0e8afa
--- /dev/null
+++ b/src/MeloNX/MeloNX/Dependencies/Dynamic Libraries/Hypervisor.framework/_CodeSignature/CodeResources
@@ -0,0 +1,101 @@
+
+
+
+
+ files
+
+ Info.plist
+
+ kW04s165Fr3AhY1rHcISuPzpuPA=
+
+
+ files2
+
+ rules
+
+ ^.*
+
+ ^.*\.lproj/
+
+ optional
+
+ weight
+ 1000
+
+ ^.*\.lproj/locversion.plist$
+
+ omit
+
+ weight
+ 1100
+
+ ^Base\.lproj/
+
+ weight
+ 1010
+
+ ^version.plist$
+
+
+ rules2
+
+ .*\.dSYM($|/)
+
+ weight
+ 11
+
+ ^(.*/)?\.DS_Store$
+
+ omit
+
+ weight
+ 2000
+
+ ^.*
+
+ ^.*\.lproj/
+
+ optional
+
+ weight
+ 1000
+
+ ^.*\.lproj/locversion.plist$
+
+ omit
+
+ weight
+ 1100
+
+ ^Base\.lproj/
+
+ weight
+ 1010
+
+ ^Info\.plist$
+
+ omit
+
+ weight
+ 20
+
+ ^PkgInfo$
+
+ omit
+
+ weight
+ 20
+
+ ^embedded\.provisionprofile$
+
+ weight
+ 20
+
+ ^version\.plist$
+
+ weight
+ 20
+
+
+
+
diff --git a/src/Ryujinx.Cpu/AppleHv/HvAddressSpace.cs b/src/Ryujinx.Cpu/AppleHv/HvAddressSpace.cs
index eb7c0ef08..1dc52ff2a 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvAddressSpace.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvAddressSpace.cs
@@ -6,6 +6,7 @@ using System.Runtime.Versioning;
namespace Ryujinx.Cpu.AppleHv
{
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
class HvAddressSpace : IDisposable
{
private const ulong KernelRegionBase = unchecked((ulong)-(1L << 39));
diff --git a/src/Ryujinx.Cpu/AppleHv/HvAddressSpaceRange.cs b/src/Ryujinx.Cpu/AppleHv/HvAddressSpaceRange.cs
index 7754431fa..dd7de06a1 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvAddressSpaceRange.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvAddressSpaceRange.cs
@@ -8,6 +8,7 @@ using System.Threading;
namespace Ryujinx.Cpu.AppleHv
{
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
class HvAddressSpaceRange : IDisposable
{
private const ulong AllocationGranule = 1UL << 14;
diff --git a/src/Ryujinx.Cpu/AppleHv/HvApi.cs b/src/Ryujinx.Cpu/AppleHv/HvApi.cs
index e6e08111f..cb045c846 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvApi.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvApi.cs
@@ -265,9 +265,10 @@ namespace Ryujinx.Cpu.AppleHv
}
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
static partial class HvApi
{
- public const string LibraryName = "/System/Library/Frameworks/Hypervisor.framework/Hypervisor";
+ public const string LibraryName = "Hypervisor.framework/Hypervisor";
[LibraryImport(LibraryName, SetLastError = true)]
public static partial HvResult hv_vm_get_max_vcpu_count(out uint max_vcpu_count);
diff --git a/src/Ryujinx.Cpu/AppleHv/HvCpuContext.cs b/src/Ryujinx.Cpu/AppleHv/HvCpuContext.cs
index 99e4c0479..c3dd941df 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvCpuContext.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvCpuContext.cs
@@ -4,6 +4,7 @@ using System.Runtime.Versioning;
namespace Ryujinx.Cpu.AppleHv
{
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
class HvCpuContext : ICpuContext
{
private readonly ITickSource _tickSource;
diff --git a/src/Ryujinx.Cpu/AppleHv/HvEngine.cs b/src/Ryujinx.Cpu/AppleHv/HvEngine.cs
index c3c1a4484..e07027575 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvEngine.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvEngine.cs
@@ -3,6 +3,7 @@ using System.Runtime.Versioning;
namespace Ryujinx.Cpu.AppleHv
{
+ [SupportedOSPlatform("ios")]
[SupportedOSPlatform("macos")]
public class HvEngine : ICpuEngine
{
diff --git a/src/Ryujinx.Cpu/AppleHv/HvExecutionContext.cs b/src/Ryujinx.Cpu/AppleHv/HvExecutionContext.cs
index fc2b76d15..e1cd71a4b 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvExecutionContext.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvExecutionContext.cs
@@ -8,6 +8,7 @@ using System.Threading;
namespace Ryujinx.Cpu.AppleHv
{
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
class HvExecutionContext : IExecutionContext
{
///
diff --git a/src/Ryujinx.Cpu/AppleHv/HvExecutionContextVcpu.cs b/src/Ryujinx.Cpu/AppleHv/HvExecutionContextVcpu.cs
index bb232940d..6e29d36b1 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvExecutionContextVcpu.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvExecutionContextVcpu.cs
@@ -7,6 +7,7 @@ using System.Runtime.Versioning;
namespace Ryujinx.Cpu.AppleHv
{
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
class HvExecutionContextVcpu : IHvExecutionContext
{
private static readonly MemoryBlock _setSimdFpRegFuncMem;
diff --git a/src/Ryujinx.Cpu/AppleHv/HvMemoryBlockAllocation.cs b/src/Ryujinx.Cpu/AppleHv/HvMemoryBlockAllocation.cs
index 855d313c5..1ccce888d 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvMemoryBlockAllocation.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvMemoryBlockAllocation.cs
@@ -5,6 +5,7 @@ using System.Runtime.Versioning;
namespace Ryujinx.Cpu.AppleHv
{
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
readonly struct HvMemoryBlockAllocation : IDisposable
{
private readonly HvMemoryBlockAllocator _owner;
diff --git a/src/Ryujinx.Cpu/AppleHv/HvMemoryBlockAllocator.cs b/src/Ryujinx.Cpu/AppleHv/HvMemoryBlockAllocator.cs
index 86936c592..63f7db107 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvMemoryBlockAllocator.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvMemoryBlockAllocator.cs
@@ -4,6 +4,7 @@ using System.Runtime.Versioning;
namespace Ryujinx.Cpu.AppleHv
{
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
class HvMemoryBlockAllocator : PrivateMemoryAllocatorImpl
{
public class Block : PrivateMemoryAllocator.Block
diff --git a/src/Ryujinx.Cpu/AppleHv/HvMemoryManager.cs b/src/Ryujinx.Cpu/AppleHv/HvMemoryManager.cs
index 947c37100..fff5f2030 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvMemoryManager.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvMemoryManager.cs
@@ -16,6 +16,7 @@ namespace Ryujinx.Cpu.AppleHv
/// Represents a CPU memory manager which maps guest virtual memory directly onto the Hypervisor page table.
///
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
public class HvMemoryManager : MemoryManagerBase, IMemoryManager, IVirtualMemoryManagerTracked, IWritableBlock
{
public const int PageBits = 12;
diff --git a/src/Ryujinx.Cpu/AppleHv/HvVcpu.cs b/src/Ryujinx.Cpu/AppleHv/HvVcpu.cs
index ee91c478b..1e124c2e4 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvVcpu.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvVcpu.cs
@@ -4,6 +4,7 @@ using System.Runtime.Versioning;
namespace Ryujinx.Cpu.AppleHv
{
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
unsafe class HvVcpu
{
private const ulong InterruptIntervalNs = 16 * 1000000; // 16 ms
diff --git a/src/Ryujinx.Cpu/AppleHv/HvVcpuPool.cs b/src/Ryujinx.Cpu/AppleHv/HvVcpuPool.cs
index 2edcd7e4e..2b0d16780 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvVcpuPool.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvVcpuPool.cs
@@ -5,6 +5,7 @@ using System.Threading;
namespace Ryujinx.Cpu.AppleHv
{
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
class HvVcpuPool
{
// Since there's a limit on the number of VCPUs we can create,
diff --git a/src/Ryujinx.Cpu/AppleHv/HvVm.cs b/src/Ryujinx.Cpu/AppleHv/HvVm.cs
index c4f107532..671c69dfa 100644
--- a/src/Ryujinx.Cpu/AppleHv/HvVm.cs
+++ b/src/Ryujinx.Cpu/AppleHv/HvVm.cs
@@ -5,6 +5,7 @@ using System.Runtime.Versioning;
namespace Ryujinx.Cpu.AppleHv
{
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
static class HvVm
{
// This alignment allows us to use larger blocks on the page table.
diff --git a/src/Ryujinx.Cpu/AppleHv/TimeApi.cs b/src/Ryujinx.Cpu/AppleHv/TimeApi.cs
index 85bc77178..c823e891d 100644
--- a/src/Ryujinx.Cpu/AppleHv/TimeApi.cs
+++ b/src/Ryujinx.Cpu/AppleHv/TimeApi.cs
@@ -10,6 +10,7 @@ namespace Ryujinx.Cpu.AppleHv
}
[SupportedOSPlatform("macos")]
+ [SupportedOSPlatform("ios")]
static partial class TimeApi
{
[LibraryImport("libc", SetLastError = true)]
diff --git a/src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs b/src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs
index 61cfbb6ec..777a34cee 100644
--- a/src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs
+++ b/src/Ryujinx.Graphics.Vulkan/CommandBufferPool.cs
@@ -313,7 +313,14 @@ namespace Ryujinx.Graphics.Vulkan
lock (_queueLock)
{
- _api.QueueSubmit(_queue, 1, sInfo, entry.Fence.GetUnsafe()).ThrowOnError();
+ Result result = _api.QueueSubmit(_queue, 1, sInfo, entry.Fence.GetUnsafe());
+
+ if (result != Result.Success)
+ {
+
+ Console.WriteLine($"QueueSubmit failed with error: {result}");
+
+ }
}
}
}
diff --git a/src/Ryujinx.HLE/HOS/ArmProcessContextFactory.cs b/src/Ryujinx.HLE/HOS/ArmProcessContextFactory.cs
index a6fbb5b24..9fbe1e013 100644
--- a/src/Ryujinx.HLE/HOS/ArmProcessContextFactory.cs
+++ b/src/Ryujinx.HLE/HOS/ArmProcessContextFactory.cs
@@ -1,4 +1,4 @@
-using Ryujinx.Common.Configuration;
+using Ryujinx.Common.Configuration;
using Ryujinx.Common.Logging;
using Ryujinx.Cpu;
using Ryujinx.Cpu.AppleHv;
@@ -49,7 +49,7 @@ namespace Ryujinx.HLE.HOS
bool isArm64Host = RuntimeInformation.ProcessArchitecture == Architecture.Arm64;
- if (OperatingSystem.IsMacOS() && isArm64Host && for64Bit && context.Device.Configuration.UseHypervisor)
+ if ((OperatingSystem.IsMacOS() || (!OperatingSystem.IsIOSVersionAtLeast(16, 4))) && isArm64Host && for64Bit && context.Device.Configuration.UseHypervisor)
{
var cpuEngine = new HvEngine(_tickSource);
var memoryManager = new HvMemoryManager(context.Memory, addressSpaceSize, invalidAccessHandler);
diff --git a/src/Ryujinx.Headless.SDL2/Options.cs b/src/Ryujinx.Headless.SDL2/Options.cs
index 3d7ffabdf..bd3ad4c17 100644
--- a/src/Ryujinx.Headless.SDL2/Options.cs
+++ b/src/Ryujinx.Headless.SDL2/Options.cs
@@ -147,8 +147,8 @@ namespace Ryujinx.Headless.SDL2
[Option("audio-volume", Required = false, Default = 1.0f, HelpText = "The audio level (0 to 1).")]
public float AudioVolume { get; set; }
- [Option("use-hypervisor", Required = false, Default = true, HelpText = "Uses Hypervisor over JIT if available.")]
- public bool? UseHypervisor { get; set; }
+ [Option("use-hypervisor", Required = false, Default = false, HelpText = "Uses Hypervisor over JIT if available.")]
+ public bool UseHypervisor { get; set; }
[Option("lan-interface-id", Required = false, Default = "0", HelpText = "GUID for the network interface used by LAN.")]
public string MultiplayerLanInterfaceId { get; set; }
diff --git a/src/Ryujinx.Headless.SDL2/Program.cs b/src/Ryujinx.Headless.SDL2/Program.cs
index 585bc00ff..d8aac2fe4 100644
--- a/src/Ryujinx.Headless.SDL2/Program.cs
+++ b/src/Ryujinx.Headless.SDL2/Program.cs
@@ -1283,6 +1283,19 @@ namespace Ryujinx.Headless.SDL2
renderer = new ThreadedRenderer(renderer);
}
+ bool AppleHV = false;
+
+ if ((!OperatingSystem.IsIOSVersionAtLeast(16, 4)) && options.UseHypervisor)
+ {
+ AppleHV = true;
+ }
+ else if (OperatingSystem.IsIOS())
+ {
+ AppleHV = false;
+ } else {
+ AppleHV = options.UseHypervisor;
+ }
+
HLEConfiguration configuration = new(_virtualFileSystem,
_libHacHorizonManager,
_contentManager,
@@ -1306,7 +1319,7 @@ namespace Ryujinx.Headless.SDL2
options.IgnoreMissingServices,
options.AspectRatio,
options.AudioVolume,
- options.UseHypervisor ?? false,
+ AppleHV,
options.MultiplayerLanInterfaceId,
Common.Configuration.Multiplayer.MultiplayerMode.LdnMitm);