some initial metal commits cherry-picked
This commit is contained in:
25
src/Ryujinx/UI/Renderer/EmbeddedWindowMetal.cs
Normal file
25
src/Ryujinx/UI/Renderer/EmbeddedWindowMetal.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user