mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-01-09 03:07:45 -03:00
Silence compile warnings
This commit is contained in:
parent
bff884a89c
commit
61303032f1
1 changed files with 8 additions and 5 deletions
|
@ -915,17 +915,20 @@ namespace Ryujinx.Ava
|
|||
IRenderer renderer;
|
||||
GraphicsBackend backend = ConfigurationState.Instance.Graphics.GraphicsBackend;
|
||||
|
||||
if (backend == GraphicsBackend.Vulkan || (backend == GraphicsBackend.Auto && !ShouldInitMetal))
|
||||
if (ShouldInitMetal)
|
||||
{
|
||||
#pragma warning disable CA1416 This call site is reachable on all platforms
|
||||
// The condition does a check for Mac, on top of checking if it's an ARM Mac. This isn't a problem.
|
||||
renderer = new MetalRenderer((RendererHost.EmbeddedWindow as EmbeddedWindowMetal)!.CreateSurface);
|
||||
#pragma warning restore CA1416
|
||||
}
|
||||
else if (backend == GraphicsBackend.Vulkan || (backend == GraphicsBackend.Auto && !ShouldInitMetal))
|
||||
{
|
||||
renderer = VulkanRenderer.Create(
|
||||
ConfigurationState.Instance.Graphics.PreferredGpu,
|
||||
(RendererHost.EmbeddedWindow as EmbeddedWindowVulkan)!.CreateSurface,
|
||||
VulkanHelper.GetRequiredInstanceExtensions);
|
||||
}
|
||||
else if (ShouldInitMetal)
|
||||
{
|
||||
renderer = new MetalRenderer((RendererHost.EmbeddedWindow as EmbeddedWindowMetal).CreateSurface);
|
||||
}
|
||||
else
|
||||
{
|
||||
renderer = new OpenGLRenderer();
|
||||
|
|
Loading…
Reference in a new issue