diff options
author | Mary <mary@mary.zone> | 2022-05-04 20:21:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-04 20:21:27 +0200 |
commit | 39bdf6d41e6cad370f7a10b766d91418c194ead8 (patch) | |
tree | 121882cecded7039f9fe813c9a9cc3f3f56a91b8 /Ryujinx/Program.cs | |
parent | 074190e03c975cab0fdc2be35adfaf0fe831f29b (diff) |
infra: Warn about support drop of old Windows versions (#3299)1.1.115
* infra: Warn about support drop of old Windows versions
See #3298.
* Address comment
Diffstat (limited to 'Ryujinx/Program.cs')
-rw-r--r-- | Ryujinx/Program.cs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Ryujinx/Program.cs b/Ryujinx/Program.cs index 26b89d06..267acefa 100644 --- a/Ryujinx/Program.cs +++ b/Ryujinx/Program.cs @@ -32,8 +32,20 @@ namespace Ryujinx [DllImport("libX11")] private extern static int XInitThreads(); + [DllImport("user32.dll", SetLastError = true)] + public static extern int MessageBoxA(IntPtr hWnd, string text, string caption, uint type); + + private const uint MB_ICONWARNING = 0x30; + static void Main(string[] args) - { + { + Version = ReleaseInformations.GetVersion(); + + if (OperatingSystem.IsWindows() && !OperatingSystem.IsWindowsVersionAtLeast(10, 0, 17134)) + { + MessageBoxA(IntPtr.Zero, "You are running an outdated version of Windows.\n\nStarting on June 1st 2022, Ryujinx will only support Windows 10 1803 and newer.\n", $"Ryujinx {Version}", MB_ICONWARNING); + } + // Parse Arguments. string launchPathArg = null; string baseDirPathArg = null; @@ -82,8 +94,6 @@ namespace Ryujinx // Delete backup files after updating. Task.Run(Updater.CleanupUpdate); - Version = ReleaseInformations.GetVersion(); - Console.Title = $"Ryujinx Console {Version}"; // NOTE: GTK3 doesn't init X11 in a multi threaded way. |