mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-12 07:36:59 +00:00
misc: Add a launch guard for program files (the emulator does not work properly when put here as it does not require admin)
This commit is contained in:
parent
53aae9b584
commit
40f709ff55
1 changed files with 14 additions and 4 deletions
|
|
@ -48,11 +48,21 @@ namespace Ryujinx.Ava
|
|||
public static int Main(string[] args)
|
||||
{
|
||||
Version = ReleaseInformation.Version;
|
||||
|
||||
if (OperatingSystem.IsWindows() && !OperatingSystem.IsWindowsVersionAtLeast(10, 0, 19041))
|
||||
|
||||
if (OperatingSystem.IsWindows())
|
||||
{
|
||||
_ = MessageBoxA(nint.Zero, "You are running an outdated version of Windows.\n\nRyujinx supports Windows 10 version 20H1 and newer.\n", $"Ryujinx {Version}", MbIconwarning);
|
||||
return 0;
|
||||
if (!OperatingSystem.IsWindowsVersionAtLeast(10, 0, 19041))
|
||||
{
|
||||
_ = MessageBoxA(nint.Zero, "You are running an outdated version of Windows.\n\nRyujinx supports Windows 10 version 20H1 and newer.\n", $"Ryujinx {Version}", MbIconwarning);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (Environment.CurrentDirectory.StartsWithIgnoreCase("C:\\Program Files") ||
|
||||
Environment.CurrentDirectory.StartsWithIgnoreCase("C:\\Program Files (x86)"))
|
||||
{
|
||||
_ = MessageBoxA(nint.Zero, "Ryujinx is not intended to be run from the Program Files folder. Please move it out and relaunch.", $"Ryujinx {Version}", MbIconwarning);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
PreviewerDetached = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue