From 4868fface808dfc3a71d032712d782cc3c7c6507 Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Sat, 18 Jan 2025 15:33:05 -0600 Subject: [PATCH] UI: Intel Mac warning Upon launch, shows a warning about using an Intel Mac. This will only show once every boot. You can only turn it off by getting a better system. --- src/Ryujinx/UI/Windows/MainWindow.axaml.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/Ryujinx/UI/Windows/MainWindow.axaml.cs b/src/Ryujinx/UI/Windows/MainWindow.axaml.cs index 2aaac4098..5a5fb502e 100644 --- a/src/Ryujinx/UI/Windows/MainWindow.axaml.cs +++ b/src/Ryujinx/UI/Windows/MainWindow.axaml.cs @@ -32,6 +32,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Reactive.Linq; +using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Threading; using System.Threading.Tasks; @@ -136,6 +137,8 @@ namespace Ryujinx.Ava.UI.Windows base.OnApplyTemplate(e); NotificationHelper.SetNotificationManager(this); + + ShowIntelMacWarningAsync(); } private void OnScalingChanged(object sender, EventArgs e) @@ -731,5 +734,22 @@ namespace Ryujinx.Ava.UI.Windows (int)Symbol.Checkmark); }); } + + private static bool _intelMacWarningShown; + + public static async Task ShowIntelMacWarningAsync() + { + if (!_intelMacWarningShown && + (OperatingSystem.IsMacOS() && + (RuntimeInformation.OSArchitecture == Architecture.X64 || + RuntimeInformation.OSArchitecture == Architecture.X86))) + { + _intelMacWarningShown = true; + + await Dispatcher.UIThread.InvokeAsync(async () => await ContentDialogHelper.CreateWarningDialog( + "Intel Mac Warning", + "Intel Macs are not supported and will not work properly.\nIf you continue, do not come to our Discord asking for support.")); + } + } } }