mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-01-23 13:35:04 +03:00
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.
This commit is contained in:
parent
6fca4492d0
commit
4868fface8
@ -32,6 +32,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reactive.Linq;
|
using System.Reactive.Linq;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
using System.Runtime.Versioning;
|
using System.Runtime.Versioning;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@ -136,6 +137,8 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
base.OnApplyTemplate(e);
|
base.OnApplyTemplate(e);
|
||||||
|
|
||||||
NotificationHelper.SetNotificationManager(this);
|
NotificationHelper.SetNotificationManager(this);
|
||||||
|
|
||||||
|
ShowIntelMacWarningAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnScalingChanged(object sender, EventArgs e)
|
private void OnScalingChanged(object sender, EventArgs e)
|
||||||
@ -731,5 +734,22 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
(int)Symbol.Checkmark);
|
(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."));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user