diff options
author | gdkchan <gab.dark.100@gmail.com> | 2023-01-29 08:37:52 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-29 08:37:52 -0300 |
commit | a53cfdab78c382677eb826bd5bedb58b3b838796 (patch) | |
tree | 74443a950127d61abb6ecd9f840c03886b223ce1 /Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs | |
parent | c7f9962ddee502030e790a0bfc0f949eaf5910c7 (diff) |
Initial Apple Hypervisor based CPU emulation (#4332)1.1.597
* Initial Apple Hypervisor based CPU emulation implementation
* Add UseHypervisor Setting
* Add basic MacOS support to Avalonia
* Fix initialization
* Fix GTK build
* Fix/silence warnings
* Change exceptions to asserts on HvAddressSpaceRange
* Replace DllImport with LibraryImport
* Fix LibraryImport
* Remove unneeded usings
* Revert outdated change
* Set DiskCacheLoadState when using hypervisor too
* Fix HvExecutionContext PC value
* Address PR feedback
* Use existing entitlements.xml file on distribution folder
---------
Co-authored-by: riperiperi <rhy3756547@hotmail.com>
Diffstat (limited to 'Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs')
-rw-r--r-- | Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs b/Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs index e6a0111e..36b37b0f 100644 --- a/Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs +++ b/Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs @@ -22,6 +22,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; +using System.Runtime.InteropServices; using TimeZone = Ryujinx.Ava.UI.Models.TimeZone; namespace Ryujinx.Ava.UI.ViewModels @@ -59,6 +60,7 @@ namespace Ryujinx.Ava.UI.ViewModels OnPropertyChanged(nameof(IsCustomResolutionScaleActive)); } } + public int GraphicsBackendMultithreadingIndex { get => _graphicsBackendMultithreadingIndex; @@ -106,6 +108,8 @@ namespace Ryujinx.Ava.UI.ViewModels public bool IsOpenGLAvailable => !OperatingSystem.IsMacOS(); + public bool IsHypervisorAvailable => OperatingSystem.IsMacOS() && RuntimeInformation.ProcessArchitecture == Architecture.Arm64; + public bool DirectoryChanged { get => _directoryChanged; @@ -117,10 +121,7 @@ namespace Ryujinx.Ava.UI.ViewModels } } - public bool IsMacOS - { - get => OperatingSystem.IsMacOS(); - } + public bool IsMacOS => OperatingSystem.IsMacOS(); public bool EnableDiscordIntegration { get; set; } public bool CheckUpdatesOnStart { get; set; } @@ -153,6 +154,7 @@ namespace Ryujinx.Ava.UI.ViewModels public bool EnableCustomTheme { get; set; } public bool IsCustomResolutionScaleActive => _resolutionScale == 4; public bool IsVulkanSelected => GraphicsBackendIndex == 0; + public bool UseHypervisor { get; set; } public string TimeZone { get; set; } public string ShaderDumpPath { get; set; } @@ -349,6 +351,7 @@ namespace Ryujinx.Ava.UI.ViewModels // CPU EnablePptc = config.System.EnablePtc; MemoryMode = (int)config.System.MemoryManagerMode.Value; + UseHypervisor = config.System.UseHypervisor; // Graphics GraphicsBackendIndex = (int)config.Graphics.GraphicsBackend.Value; @@ -369,7 +372,7 @@ namespace Ryujinx.Ava.UI.ViewModels // Network EnableInternetAccess = config.System.EnableInternetAccess; - + // Logging EnableFileLog = config.Logger.EnableFileLog; EnableStub = config.Logger.EnableStub; @@ -432,6 +435,7 @@ namespace Ryujinx.Ava.UI.ViewModels // CPU config.System.EnablePtc.Value = EnablePptc; config.System.MemoryManagerMode.Value = (MemoryManagerMode)MemoryMode; + config.System.UseHypervisor.Value = UseHypervisor; // Graphics config.Graphics.GraphicsBackend.Value = (GraphicsBackend)GraphicsBackendIndex; |