mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-23 03:01:20 -08:00
Disable CLI setting persistence for HW-accelerated GUI. (#6620)
This commit is contained in:
parent
3e6e0e4afa
commit
c1b0ab805a
@ -91,9 +91,6 @@ namespace Ryujinx.UI.Common.Helper
|
|||||||
case "--software-gui":
|
case "--software-gui":
|
||||||
OverrideHardwareAcceleration = false;
|
OverrideHardwareAcceleration = false;
|
||||||
break;
|
break;
|
||||||
case "--hardware-gui":
|
|
||||||
OverrideHardwareAcceleration = true;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
LaunchPathArg = arg;
|
LaunchPathArg = arg;
|
||||||
break;
|
break;
|
||||||
|
@ -27,6 +27,7 @@ namespace Ryujinx.Ava
|
|||||||
public static string Version { get; private set; }
|
public static string Version { get; private set; }
|
||||||
public static string ConfigurationPath { get; private set; }
|
public static string ConfigurationPath { get; private set; }
|
||||||
public static bool PreviewerDetached { get; private set; }
|
public static bool PreviewerDetached { get; private set; }
|
||||||
|
public static bool UseHardwareAcceleration { get; private set; }
|
||||||
|
|
||||||
[LibraryImport("user32.dll", SetLastError = true)]
|
[LibraryImport("user32.dll", SetLastError = true)]
|
||||||
public static partial int MessageBoxA(IntPtr hWnd, [MarshalAs(UnmanagedType.LPStr)] string text, [MarshalAs(UnmanagedType.LPStr)] string caption, uint type);
|
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,
|
EnableMultiTouch = true,
|
||||||
EnableIme = true,
|
EnableIme = true,
|
||||||
EnableInputFocusProxy = Environment.GetEnvironmentVariable("XDG_CURRENT_DESKTOP") == "gamescope",
|
EnableInputFocusProxy = Environment.GetEnvironmentVariable("XDG_CURRENT_DESKTOP") == "gamescope",
|
||||||
RenderingMode = ConfigurationState.Instance.EnableHardwareAcceleration ?
|
RenderingMode = UseHardwareAcceleration ?
|
||||||
new[] { X11RenderingMode.Glx, X11RenderingMode.Software } :
|
new[] { X11RenderingMode.Glx, X11RenderingMode.Software } :
|
||||||
new[] { X11RenderingMode.Software },
|
new[] { X11RenderingMode.Software },
|
||||||
})
|
})
|
||||||
.With(new Win32PlatformOptions
|
.With(new Win32PlatformOptions
|
||||||
{
|
{
|
||||||
WinUICompositionBackdropCornerRadius = 8.0f,
|
WinUICompositionBackdropCornerRadius = 8.0f,
|
||||||
RenderingMode = ConfigurationState.Instance.EnableHardwareAcceleration ?
|
RenderingMode = UseHardwareAcceleration ?
|
||||||
new[] { Win32RenderingMode.AngleEgl, Win32RenderingMode.Software } :
|
new[] { Win32RenderingMode.AngleEgl, Win32RenderingMode.Software } :
|
||||||
new[] { Win32RenderingMode.Software },
|
new[] { Win32RenderingMode.Software },
|
||||||
})
|
})
|
||||||
@ -165,6 +166,8 @@ namespace Ryujinx.Ava
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UseHardwareAcceleration = ConfigurationState.Instance.EnableHardwareAcceleration.Value;
|
||||||
|
|
||||||
// Check if graphics backend was overridden
|
// Check if graphics backend was overridden
|
||||||
if (CommandLineState.OverrideGraphicsBackend != null)
|
if (CommandLineState.OverrideGraphicsBackend != null)
|
||||||
{
|
{
|
||||||
@ -199,7 +202,7 @@ namespace Ryujinx.Ava
|
|||||||
// Check if hardware-acceleration was overridden.
|
// Check if hardware-acceleration was overridden.
|
||||||
if (CommandLineState.OverrideHardwareAcceleration != null)
|
if (CommandLineState.OverrideHardwareAcceleration != null)
|
||||||
{
|
{
|
||||||
ConfigurationState.Instance.EnableHardwareAcceleration.Value = CommandLineState.OverrideHardwareAcceleration.Value;
|
UseHardwareAcceleration = CommandLineState.OverrideHardwareAcceleration.Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user