FIx build
This commit is contained in:
committed by
Evan Husted
parent
3c562d8906
commit
76bafe75f4
@@ -905,7 +905,7 @@ namespace Ryujinx.Ava
|
||||
}
|
||||
else if (ConfigurationState.Instance.Graphics.GraphicsBackend.Value == GraphicsBackend.Metal && OperatingSystem.IsMacOS())
|
||||
{
|
||||
renderer = new MetalRenderer();
|
||||
renderer = new MetalRenderer((RendererHost.EmbeddedWindow as EmbeddedWindowMetal).CreateSurface);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,25 +1,12 @@
|
||||
using SPB.Windowing;
|
||||
using SPB.Platform.Metal;
|
||||
using System;
|
||||
using SharpMetal.QuartzCore;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Renderer
|
||||
{
|
||||
public class EmbeddedWindowMetal : EmbeddedWindow
|
||||
{
|
||||
public SimpleMetalWindow CreateSurface()
|
||||
public CAMetalLayer CreateSurface()
|
||||
{
|
||||
SimpleMetalWindow simpleMetalWindow;
|
||||
|
||||
if (OperatingSystem.IsMacOS())
|
||||
{
|
||||
simpleMetalWindow = new SimpleMetalWindow(new NativeHandle(NsView), new NativeHandle(MetalLayer));
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
return simpleMetalWindow;
|
||||
return new CAMetalLayer(MetalLayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,14 +17,13 @@ namespace Ryujinx.Ava.UI.Renderer
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
if (ConfigurationState.Instance.Graphics.GraphicsBackend.Value == GraphicsBackend.OpenGl)
|
||||
EmbeddedWindow = ConfigurationState.Instance.Graphics.GraphicsBackend.Value switch
|
||||
{
|
||||
EmbeddedWindow = new EmbeddedWindowOpenGL();
|
||||
}
|
||||
else
|
||||
{
|
||||
EmbeddedWindow = new EmbeddedWindowVulkan();
|
||||
}
|
||||
GraphicsBackend.OpenGl => new EmbeddedWindowOpenGL(),
|
||||
GraphicsBackend.Metal => new EmbeddedWindowMetal(),
|
||||
GraphicsBackend.Vulkan => new EmbeddedWindowVulkan(),
|
||||
_ => throw new NotSupportedException()
|
||||
};
|
||||
|
||||
Initialize();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user