misc: chore: More descriptive error for trying to create a Metal EmbeddedWindow on non-ARM Mac

This commit is contained in:
Evan Husted 2025-02-01 03:28:26 -06:00
parent 2ab806f759
commit cc3b95eee1

View File

@ -1,3 +1,4 @@
using Ryujinx.Common.Helper;
using SharpMetal.QuartzCore;
using System;
@ -7,14 +8,12 @@ namespace Ryujinx.Ava.UI.Renderer
{
public CAMetalLayer CreateSurface()
{
if (OperatingSystem.IsMacOS())
if (OperatingSystem.IsMacOS() && RunningPlatform.IsArm)
{
return new CAMetalLayer(MetalLayer);
}
else
{
throw new NotSupportedException();
}
throw new NotSupportedException($"Cannot create a {nameof(CAMetalLayer)} without being on ARM Mac.");
}
}
}