mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-01 02:52:56 +00:00
fix hide console breaking on windows 11 (!33)
force the emulator to launch in an old-school cmd on windows Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/33
This commit is contained in:
@@ -16,15 +16,6 @@ namespace Ryujinx.Common.Helper
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
private static partial bool ShowWindow(nint hWnd, int nCmdShow);
|
||||
|
||||
[SupportedOSPlatform("windows")]
|
||||
[LibraryImport("user32")]
|
||||
private static partial nint GetForegroundWindow();
|
||||
|
||||
[SupportedOSPlatform("windows")]
|
||||
[LibraryImport("user32")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
private static partial bool SetForegroundWindow(nint hWnd);
|
||||
|
||||
public static bool SetConsoleWindowStateSupported => OperatingSystem.IsWindows();
|
||||
|
||||
public static void SetConsoleWindowState(bool show)
|
||||
@@ -53,10 +44,6 @@ namespace Ryujinx.Common.Helper
|
||||
return;
|
||||
}
|
||||
|
||||
SetForegroundWindow(hWnd);
|
||||
|
||||
hWnd = GetForegroundWindow();
|
||||
|
||||
ShowWindow(hWnd, show ? SW_SHOW : SW_HIDE);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user