diff --git a/src/Ryujinx/Program.cs b/src/Ryujinx/Program.cs index cb219b216..344962f09 100644 --- a/src/Ryujinx/Program.cs +++ b/src/Ryujinx/Program.cs @@ -115,6 +115,12 @@ namespace Ryujinx.Ava public static AppBuilder BuildAvaloniaApp() => AppBuilder.Configure() .UsePlatformDetect() + + // Vulkan UI rendering performs better, but its unpolished, and as such it lacks effective transparency. + // https://github.com/AvaloniaUI/Avalonia/issues/19378 + // https://github.com/AvaloniaUI/Avalonia/issues/9610 + // X11RenderingMode.Glx && X11RenderingMode.Egl, Win32RenderingMode.Vulkan have these issues. + .With(new X11PlatformOptions { EnableMultiTouch = true, diff --git a/src/Ryujinx/Systems/AppHost.cs b/src/Ryujinx/Systems/AppHost.cs index 6675972be..962728f79 100644 --- a/src/Ryujinx/Systems/AppHost.cs +++ b/src/Ryujinx/Systems/AppHost.cs @@ -46,6 +46,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Runtime; using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; @@ -662,6 +663,7 @@ namespace Ryujinx.Ava.Systems _chrono.Stop(); _playTimer.Stop(); + GCSettings.LatencyMode = GCLatencyMode.Interactive; } public void DisposeGpu() @@ -916,6 +918,7 @@ namespace Ryujinx.Ava.Systems appMetadata => appMetadata.UpdatePreGame() ); _playTimer.Start(); + GCSettings.LatencyMode = GCLatencyMode.SustainedLowLatency; } internal void Resume() @@ -926,6 +929,7 @@ namespace Ryujinx.Ava.Systems _playTimer.Start(); _viewModel.Title = TitleHelper.ActiveApplicationTitle(Device?.Processes.ActiveApplication, Program.Version, !ConfigurationState.Instance.ShowOldUI); Logger.Info?.Print(LogClass.Emulation, "Emulation was resumed."); + GCSettings.LatencyMode = GCLatencyMode.SustainedLowLatency; } internal void Pause() @@ -936,6 +940,7 @@ namespace Ryujinx.Ava.Systems _playTimer.Stop(); _viewModel.Title = TitleHelper.ActiveApplicationTitle(Device?.Processes.ActiveApplication, Program.Version, !ConfigurationState.Instance.ShowOldUI, LocaleManager.Instance[LocaleKeys.Paused]); Logger.Info?.Print(LogClass.Emulation, "Emulation was paused."); + GCSettings.LatencyMode = GCLatencyMode.Interactive; } private void InitEmulatedSwitch() diff --git a/src/Ryujinx/runtimeconfig.template.json b/src/Ryujinx/runtimeconfig.template.json new file mode 100644 index 000000000..98d74abb3 --- /dev/null +++ b/src/Ryujinx/runtimeconfig.template.json @@ -0,0 +1,10 @@ +{ + "configProperties": { + "System.GC.Concurrent": true, + "System.GC.RetainVM": true, + "System.GC.DynamicAdaptation": 0, + "System.GC.Server": true, + "System.GC.HeapCount": 4, + "System.GC.NoAffinitize": 0 + } +}