WIP V2: Experimental: Metal backend #441

Merged
GreemDev merged 369 commits from new-metal into master 2024-12-24 06:55:16 +00:00
Showing only changes of commit 6685041545 - Show all commits

View File

@ -1,14 +1,20 @@
using SharpMetal.QuartzCore; using SharpMetal.QuartzCore;
using System.Runtime.Versioning; using System;
namespace Ryujinx.Ava.UI.Renderer namespace Ryujinx.Ava.UI.Renderer
{ {
[SupportedOSPlatform("macos")]
public class EmbeddedWindowMetal : EmbeddedWindow public class EmbeddedWindowMetal : EmbeddedWindow
{ {
public CAMetalLayer CreateSurface() public CAMetalLayer CreateSurface()
{ {
return new CAMetalLayer(MetalLayer); if (OperatingSystem.IsMacOS())
{
return new CAMetalLayer(MetalLayer);
}
else
{
throw new NotSupportedException();
}
} }
} }
} }