diff options
Diffstat (limited to 'Ryujinx.Ava')
-rw-r--r-- | Ryujinx.Ava/AppHost.cs | 7 | ||||
-rw-r--r-- | Ryujinx.Ava/Assets/Locales/en_US.json | 4 | ||||
-rw-r--r-- | Ryujinx.Ava/Ryujinx.Ava.csproj | 7 | ||||
-rw-r--r-- | Ryujinx.Ava/UI/ViewModels/SettingsViewModel.cs | 14 | ||||
-rw-r--r-- | Ryujinx.Ava/UI/Views/Settings/SettingsCPUView.axaml | 10 |
5 files changed, 30 insertions, 12 deletions
diff --git a/Ryujinx.Ava/AppHost.cs b/Ryujinx.Ava/AppHost.cs index ad33d08c..6146a7d9 100644 --- a/Ryujinx.Ava/AppHost.cs +++ b/Ryujinx.Ava/AppHost.cs @@ -241,7 +241,7 @@ namespace Ryujinx.Ava { DateTime currentTime = DateTime.Now; string filename = $"ryujinx_capture_{currentTime.Year}-{currentTime.Month:D2}-{currentTime.Day:D2}_{currentTime.Hour:D2}-{currentTime.Minute:D2}-{currentTime.Second:D2}.png"; - + string directory = AppDataManager.Mode switch { AppDataManager.LaunchMode.Portable => Path.Combine(AppDataManager.BaseDirPath, "screenshots"), @@ -678,7 +678,8 @@ namespace Ryujinx.Ava ConfigurationState.Instance.System.MemoryManagerMode, ConfigurationState.Instance.System.IgnoreMissingServices, ConfigurationState.Instance.Graphics.AspectRatio, - ConfigurationState.Instance.System.AudioVolume); + ConfigurationState.Instance.System.AudioVolume, + ConfigurationState.Instance.System.UseHypervisor); Device = new Switch(configuration); } @@ -839,7 +840,7 @@ namespace Ryujinx.Ava { // Run a status update only when a frame is to be drawn. This prevents from updating the ui and wasting a render when no frame is queued. string dockedMode = ConfigurationState.Instance.System.EnableDockedMode ? LocaleManager.Instance[LocaleKeys.Docked] : LocaleManager.Instance[LocaleKeys.Handheld]; - + if (GraphicsConfig.ResScale != 1) { dockedMode += $" ({GraphicsConfig.ResScale}x)"; diff --git a/Ryujinx.Ava/Assets/Locales/en_US.json b/Ryujinx.Ava/Assets/Locales/en_US.json index 9bc6b581..b7d1e02b 100644 --- a/Ryujinx.Ava/Assets/Locales/en_US.json +++ b/Ryujinx.Ava/Assets/Locales/en_US.json @@ -7,6 +7,7 @@ "SettingsTabSystemMemoryManagerModeSoftware": "Software", "SettingsTabSystemMemoryManagerModeHost": "Host (fast)", "SettingsTabSystemMemoryManagerModeHostUnchecked": "Host Unchecked (fastest, unsafe)", + "SettingsTabSystemUseHypervisor": "Use Hypervisor", "MenuBarFile": "_File", "MenuBarFileOpenFromFile": "_Load Application From File", "MenuBarFileOpenUnpacked": "Load _Unpacked Game", @@ -457,6 +458,7 @@ "MemoryManagerSoftwareTooltip": "Use a software page table for address translation. Highest accuracy but slowest performance.", "MemoryManagerHostTooltip": "Directly map memory in the host address space. Much faster JIT compilation and execution.", "MemoryManagerUnsafeTooltip": "Directly map memory, but do not mask the address within the guest address space before access. Faster, but at the cost of safety. The guest application can access memory from anywhere in Ryujinx, so only run programs you trust with this mode.", + "UseHypervisorTooltip": "Use Hypervisor instead of JIT. Greatly improves performance when available, but can be unstable in its current state.", "DRamTooltip": "Utilizes an alternative MemoryMode layout to mimic a Switch development model.\n\nThis is only useful for higher-resolution texture packs or 4k resolution mods. Does NOT improve performance.\n\nLeave OFF if unsure.", "IgnoreMissingServicesTooltip": "Ignores unimplemented Horizon OS services. This may help in bypassing crashes when booting certain games.\n\nLeave OFF if unsure.", "GraphicsBackendThreadingTooltip": "Executes graphics backend commands on a second thread.\n\nSpeeds up shader compilation, reduces stuttering, and improves performance on GPU drivers without multithreading support of their own. Slightly better performance on drivers with multithreading.\n\nSet to AUTO if unsure.", @@ -507,7 +509,7 @@ "SettingsTabNetwork": "Network", "SettingsTabNetworkConnection": "Network Connection", "SettingsTabCpuCache": "CPU Cache", - "SettingsTabCpuMemory": "CPU Memory", + "SettingsTabCpuMemory": "CPU Mode", "DialogUpdaterFlatpakNotSupportedMessage": "Please update Ryujinx via FlatHub.", "UpdaterDisabledWarningTitle": "Updater Disabled!", "GameListContextMenuOpenSdModsDirectory": "Open Atmosphere Mods Directory", diff --git a/Ryujinx.Ava/Ryujinx.Ava.csproj b/Ryujinx.Ava/Ryujinx.Ava.csproj index 88b60d0b..61a2bcb7 100644 --- a/Ryujinx.Ava/Ryujinx.Ava.csproj +++ b/Ryujinx.Ava/Ryujinx.Ava.csproj @@ -1,4 +1,4 @@ -<Project Sdk="Microsoft.NET.Sdk"> +<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net7.0</TargetFramework> <RuntimeIdentifiers>win10-x64;osx-x64;linux-x64</RuntimeIdentifiers> @@ -6,11 +6,16 @@ <AllowUnsafeBlocks>true</AllowUnsafeBlocks> <Version>1.0.0-dirty</Version> <DefineConstants Condition=" '$(ExtraDefineConstants)' != '' ">$(DefineConstants);$(ExtraDefineConstants)</DefineConstants> + <SigningCertificate Condition=" '$(SigningCertificate)' == '' ">-</SigningCertificate> <RootNamespace>Ryujinx.Ava</RootNamespace> <ApplicationIcon>Ryujinx.ico</ApplicationIcon> <TieredPGO>true</TieredPGO> </PropertyGroup> + <Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="$([MSBuild]::IsOSPlatform('OSX'))"> + <Exec Command="codesign --entitlements $(ProjectDir)..\distribution\macos\entitlements.xml -f --deep -s $(SigningCertificate) $(TargetDir)$(TargetName)" /> + </Target> + <PropertyGroup Condition="'$(RuntimeIdentifier)' != ''"> <PublishSingleFile>true</PublishSingleFile> <PublishTrimmed>true</PublishTrimmed> 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> |