some initial metal commits cherry-picked

This commit is contained in:
Evan Husted
2024-12-23 20:35:49 -06:00
parent 278fe9d4f0
commit cbad43b003
27 changed files with 2821 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
using SPB.Windowing;
using SPB.Platform.Metal;
using System;
namespace Ryujinx.UI.Renderer
{
public class EmbeddedWindowMetal : EmbeddedWindow
{
public SimpleMetalWindow CreateSurface()
{
SimpleMetalWindow simpleMetalWindow;
if (OperatingSystem.IsMacOS())
{
simpleMetalWindow = new SimpleMetalWindow(new NativeHandle(NsView), new NativeHandle(MetalLayer));
}
else
{
throw new PlatformNotSupportedException();
}
return simpleMetalWindow;
}
}
}