aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMutantAura <44103205+MutantAura@users.noreply.github.com>2024-04-08 00:58:05 +0100
committerGitHub <noreply@github.com>2024-04-07 20:58:05 -0300
commitc1b0ab805a3f811836b00f3577ac2768998f6746 (patch)
treecf72a14af474be9d442d1b40a2468dd72ce838f6
parent3e6e0e4afaa3c3ffb118cb17b61feb16966a7eeb (diff)
Disable CLI setting persistence for HW-accelerated GUI. (#6620)1.1.1268
-rw-r--r--src/Ryujinx.UI.Common/Helper/CommandLineState.cs3
-rw-r--r--src/Ryujinx/Program.cs9
2 files changed, 6 insertions, 6 deletions
diff --git a/src/Ryujinx.UI.Common/Helper/CommandLineState.cs b/src/Ryujinx.UI.Common/Helper/CommandLineState.cs
index 6de963a7..bbacd5fe 100644
--- a/src/Ryujinx.UI.Common/Helper/CommandLineState.cs
+++ b/src/Ryujinx.UI.Common/Helper/CommandLineState.cs
@@ -91,9 +91,6 @@ namespace Ryujinx.UI.Common.Helper
case "--software-gui":
OverrideHardwareAcceleration = false;
break;
- case "--hardware-gui":
- OverrideHardwareAcceleration = true;
- break;
default:
LaunchPathArg = arg;
break;
diff --git a/src/Ryujinx/Program.cs b/src/Ryujinx/Program.cs
index 4a30aee9..89e895e8 100644
--- a/src/Ryujinx/Program.cs
+++ b/src/Ryujinx/Program.cs
@@ -27,6 +27,7 @@ namespace Ryujinx.Ava
public static string Version { get; private set; }
public static string ConfigurationPath { get; private set; }
public static bool PreviewerDetached { get; private set; }
+ public static bool UseHardwareAcceleration { get; private set; }
[LibraryImport("user32.dll", SetLastError = true)]
public static partial int MessageBoxA(IntPtr hWnd, [MarshalAs(UnmanagedType.LPStr)] string text, [MarshalAs(UnmanagedType.LPStr)] string caption, uint type);
@@ -60,14 +61,14 @@ namespace Ryujinx.Ava
EnableMultiTouch = true,
EnableIme = true,
EnableInputFocusProxy = Environment.GetEnvironmentVariable("XDG_CURRENT_DESKTOP") == "gamescope",
- RenderingMode = ConfigurationState.Instance.EnableHardwareAcceleration ?
+ RenderingMode = UseHardwareAcceleration ?
new[] { X11RenderingMode.Glx, X11RenderingMode.Software } :
new[] { X11RenderingMode.Software },
})
.With(new Win32PlatformOptions
{
WinUICompositionBackdropCornerRadius = 8.0f,
- RenderingMode = ConfigurationState.Instance.EnableHardwareAcceleration ?
+ RenderingMode = UseHardwareAcceleration ?
new[] { Win32RenderingMode.AngleEgl, Win32RenderingMode.Software } :
new[] { Win32RenderingMode.Software },
})
@@ -165,6 +166,8 @@ namespace Ryujinx.Ava
}
}
+ UseHardwareAcceleration = ConfigurationState.Instance.EnableHardwareAcceleration.Value;
+
// Check if graphics backend was overridden
if (CommandLineState.OverrideGraphicsBackend != null)
{
@@ -199,7 +202,7 @@ namespace Ryujinx.Ava
// Check if hardware-acceleration was overridden.
if (CommandLineState.OverrideHardwareAcceleration != null)
{
- ConfigurationState.Instance.EnableHardwareAcceleration.Value = CommandLineState.OverrideHardwareAcceleration.Value;
+ UseHardwareAcceleration = CommandLineState.OverrideHardwareAcceleration.Value;
}
}