From e676fd8b17c7bc89ebeaff07d4a316e662ea57ae Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Sun, 19 Jan 2025 14:42:15 -0600 Subject: [PATCH] UI: misc: simplify Intel Mac warning logic --- src/Ryujinx/UI/Windows/MainWindow.axaml.cs | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/Ryujinx/UI/Windows/MainWindow.axaml.cs b/src/Ryujinx/UI/Windows/MainWindow.axaml.cs index 6ac89b06c..7d1b5e590 100644 --- a/src/Ryujinx/UI/Windows/MainWindow.axaml.cs +++ b/src/Ryujinx/UI/Windows/MainWindow.axaml.cs @@ -735,21 +735,19 @@ namespace Ryujinx.Ava.UI.Windows }); } - private static bool _intelMacWarningShown; + private static bool _intelMacWarningShown = !(OperatingSystem.IsMacOS() && + (RuntimeInformation.OSArchitecture == Architecture.X64 || + RuntimeInformation.OSArchitecture == Architecture.X86)); public static async Task ShowIntelMacWarningAsync() { - if (!_intelMacWarningShown && - (OperatingSystem.IsMacOS() && - (RuntimeInformation.OSArchitecture == Architecture.X64 || - RuntimeInformation.OSArchitecture == Architecture.X86))) - { - _intelMacWarningShown = true; + if (_intelMacWarningShown) return; + + 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;\nand do not report bugs on the GitHub. They will be closed.")); - 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.")); - } + _intelMacWarningShown = true; } } }