mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-04-24 06:47:44 +02:00
misc: chore: simplify graphics backend selection logic in RendererHost constructor
This commit is contained in:
parent
cc3b95eee1
commit
a4a15a4c80
1 changed files with 13 additions and 13 deletions
|
@ -43,18 +43,18 @@ namespace Ryujinx.Ava.UI.Renderer
|
||||||
|
|
||||||
public RendererHost(string titleId)
|
public RendererHost(string titleId)
|
||||||
{
|
{
|
||||||
switch (TitleIDs.SelectGraphicsBackend(titleId, ConfigurationState.Instance.Graphics.GraphicsBackend))
|
Focusable = true;
|
||||||
|
FlowDirection = FlowDirection.LeftToRight;
|
||||||
|
|
||||||
|
EmbeddedWindow =
|
||||||
|
#pragma warning disable CS8509
|
||||||
|
TitleIDs.SelectGraphicsBackend(titleId, ConfigurationState.Instance.Graphics.GraphicsBackend) switch
|
||||||
|
#pragma warning restore CS8509
|
||||||
{
|
{
|
||||||
case GraphicsBackend.OpenGl:
|
GraphicsBackend.OpenGl => new EmbeddedWindowOpenGL(),
|
||||||
EmbeddedWindow = new EmbeddedWindowOpenGL();
|
GraphicsBackend.Metal => new EmbeddedWindowMetal(),
|
||||||
break;
|
GraphicsBackend.Vulkan => new EmbeddedWindowVulkan(),
|
||||||
case GraphicsBackend.Metal:
|
};
|
||||||
EmbeddedWindow = new EmbeddedWindowMetal();
|
|
||||||
break;
|
|
||||||
case GraphicsBackend.Vulkan:
|
|
||||||
EmbeddedWindow = new EmbeddedWindowVulkan();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
string backendText = EmbeddedWindow switch
|
string backendText = EmbeddedWindow switch
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue