diff options
Diffstat (limited to 'Ryujinx.Ava/UI')
-rw-r--r-- | Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs | 14 | ||||
-rw-r--r-- | Ryujinx.Ava/UI/Views/Settings/SettingsCPUView.axaml | 10 |
2 files changed, 17 insertions, 7 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; diff --git a/Ryujinx.Ava/UI/Views/Settings/SettingsCPUView.axaml b/Ryujinx.Ava/UI/Views/Settings/SettingsCPUView.axaml index a0cf3452..e98b963c 100644 --- a/Ryujinx.Ava/UI/Views/Settings/SettingsCPUView.axaml +++ b/Ryujinx.Ava/UI/Views/Settings/SettingsCPUView.axaml @@ -1,4 +1,4 @@ -<UserControl +<UserControl x:Class="Ryujinx.Ava.UI.Views.Settings.SettingsCPUView" xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" @@ -65,8 +65,14 @@ </ComboBoxItem> </ComboBox> </StackPanel> + <CheckBox IsChecked="{Binding UseHypervisor}" + IsVisible="{Binding IsHypervisorAvailable}" + ToolTip.Tip="{locale:Locale UseHypervisorTooltip}"> + <TextBlock Text="{locale:Locale SettingsTabSystemUseHypervisor}" + ToolTip.Tip="{locale:Locale UseHypervisorTooltip}" /> + </CheckBox> </StackPanel> </StackPanel> </Border> </ScrollViewer> -</UserControl>
\ No newline at end of file +</UserControl> |