Linux: Fix file picker not launching from disabling core dumps

Core dumps are disabled by default on Linux, but this prevents access to the file picker due to security hardening. To work around this, core dumps are selectively enabled and disabled around the file picker tasks.
This commit is contained in:
KeatonTheBot
2026-01-14 17:05:32 -06:00
parent 7d0947cac6
commit 253f47c971
10 changed files with 139 additions and 4 deletions
+3 -2
View File
@@ -33,6 +33,7 @@ namespace Ryujinx.Ava
public static string ConfigurationPath { get; private set; }
public static bool PreviewerDetached { get; private set; }
public static bool UseHardwareAcceleration { get; private set; }
public static bool CoreDumpArg { get; private set; }
[LibraryImport("user32.dll", SetLastError = true)]
public static partial int MessageBoxA(nint hWnd, [MarshalAs(UnmanagedType.LPStr)] string text, [MarshalAs(UnmanagedType.LPStr)] string caption, uint type);
@@ -51,6 +52,8 @@ namespace Ryujinx.Ava
bool noGuiArg = ConsumeCommandLineArgument(ref args, "--no-gui") || ConsumeCommandLineArgument(ref args, "nogui");
bool coreDumpArg = ConsumeCommandLineArgument(ref args, "--core-dumps");
CoreDumpArg = coreDumpArg;
// TODO: Ryujinx causes core dumps on Linux when it exits "uncleanly", eg. through an unhandled exception.
// This is undesirable and causes very odd behavior during development (the process stops responding,
// the .NET debugger freezes or suddenly detaches, /tmp/ gets filled etc.), unless explicitly requested by the user.
@@ -81,13 +84,11 @@ namespace Ryujinx.Ava
.UsePlatformDetect()
.With(new X11PlatformOptions
{
EnableMultiTouch = true,
EnableIme = true,
EnableInputFocusProxy = Environment.GetEnvironmentVariable("XDG_CURRENT_DESKTOP") == "gamescope",
RenderingMode = UseHardwareAcceleration ?
new[] { X11RenderingMode.Glx, X11RenderingMode.Software } :
new[] { X11RenderingMode.Software },
UseDBusFilePicker = false,
})
.With(new Win32PlatformOptions
{