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.Ui.Common/Configuration/ConfigurationState.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.Ui.Common/Configuration/ConfigurationState.cs')
-rw-r--r-- | Ryujinx.Ui.Common/Configuration/ConfigurationState.cs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Ryujinx.Ui.Common/Configuration/ConfigurationState.cs b/Ryujinx.Ui.Common/Configuration/ConfigurationState.cs index e64c69ad..f193b157 100644 --- a/Ryujinx.Ui.Common/Configuration/ConfigurationState.cs +++ b/Ryujinx.Ui.Common/Configuration/ConfigurationState.cs @@ -301,6 +301,11 @@ namespace Ryujinx.Ui.Common.Configuration /// </summary> public ReactiveObject<bool> IgnoreMissingServices { get; private set; } + /// <summary> + /// Uses Hypervisor over JIT if available + /// </summary> + public ReactiveObject<bool> UseHypervisor { get; private set; } + public SystemSection() { Language = new ReactiveObject<Language>(); @@ -327,6 +332,8 @@ namespace Ryujinx.Ui.Common.Configuration IgnoreMissingServices.Event += static (sender, e) => LogValueChange(sender, e, nameof(IgnoreMissingServices)); AudioVolume = new ReactiveObject<float>(); AudioVolume.Event += static (sender, e) => LogValueChange(sender, e, nameof(AudioVolume)); + UseHypervisor = new ReactiveObject<bool>(); + UseHypervisor.Event += static (sender, e) => LogValueChange(sender, e, nameof(UseHypervisor)); } } @@ -566,6 +573,7 @@ namespace Ryujinx.Ui.Common.Configuration MemoryManagerMode = System.MemoryManagerMode, ExpandRam = System.ExpandRam, IgnoreMissingServices = System.IgnoreMissingServices, + UseHypervisor = System.UseHypervisor, GuiColumns = new GuiColumns { FavColumn = Ui.GuiColumns.FavColumn, @@ -652,6 +660,7 @@ namespace Ryujinx.Ui.Common.Configuration System.MemoryManagerMode.Value = MemoryManagerMode.HostMappedUnsafe; System.ExpandRam.Value = false; System.IgnoreMissingServices.Value = false; + System.UseHypervisor.Value = true; Ui.GuiColumns.FavColumn.Value = true; Ui.GuiColumns.IconColumn.Value = true; Ui.GuiColumns.AppColumn.Value = true; @@ -1192,6 +1201,13 @@ namespace Ryujinx.Ui.Common.Configuration configurationFileFormat.EnableMacroHLE = true; } + if (configurationFileFormat.Version < 43) + { + Ryujinx.Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 43."); + + configurationFileFormat.UseHypervisor = true; + } + Logger.EnableFileLog.Value = configurationFileFormat.EnableFileLog; Graphics.ResScale.Value = configurationFileFormat.ResScale; Graphics.ResScaleCustom.Value = configurationFileFormat.ResScaleCustom; @@ -1233,6 +1249,7 @@ namespace Ryujinx.Ui.Common.Configuration System.MemoryManagerMode.Value = configurationFileFormat.MemoryManagerMode; System.ExpandRam.Value = configurationFileFormat.ExpandRam; System.IgnoreMissingServices.Value = configurationFileFormat.IgnoreMissingServices; + System.UseHypervisor.Value = configurationFileFormat.UseHypervisor; Ui.GuiColumns.FavColumn.Value = configurationFileFormat.GuiColumns.FavColumn; Ui.GuiColumns.IconColumn.Value = configurationFileFormat.GuiColumns.IconColumn; Ui.GuiColumns.AppColumn.Value = configurationFileFormat.GuiColumns.AppColumn; @@ -1292,4 +1309,4 @@ namespace Ryujinx.Ui.Common.Configuration Instance = new ConfigurationState(); } } -} +}
\ No newline at end of file |