mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-19 01:06:29 +02:00
misc: give various threads dedicated names
Move all title ID lists into a TitleIDs class in Ryujinx.Common, with helpers. Unify & simplify Auto graphics backend selection logic
This commit is contained in:
parent
2bf48f57d2
commit
17233d30da
8 changed files with 212 additions and 209 deletions
|
@ -1,6 +1,7 @@
|
|||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Gommon;
|
||||
using Ryujinx.Common;
|
||||
using Ryujinx.Common.Configuration;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.UI.Common.Configuration;
|
||||
|
@ -31,20 +32,6 @@ namespace Ryujinx.Ava.UI.Renderer
|
|||
Initialize();
|
||||
}
|
||||
|
||||
public static readonly string[] KnownGreatMetalTitles =
|
||||
[
|
||||
"01006f8002326000", // Animal Crossings: New Horizons
|
||||
"01009bf0072d4000", // Captain Toad: Treasure Tracker
|
||||
"0100a5c00d162000", // Cuphead
|
||||
"010023800d64a000", // Deltarune
|
||||
"010028600EBDA000", // Mario 3D World
|
||||
"0100152000022000", // Mario Kart 8 Deluxe
|
||||
"01005CA01580E000", // Persona 5
|
||||
"01008C0016544000", // Sea of Stars
|
||||
"01006A800016E000", // Smash Ultimate
|
||||
"0100000000010000", // Super Mario Odyessy
|
||||
];
|
||||
|
||||
public GraphicsBackend Backend =>
|
||||
EmbeddedWindow switch
|
||||
{
|
||||
|
@ -58,16 +45,8 @@ namespace Ryujinx.Ava.UI.Renderer
|
|||
{
|
||||
InitializeComponent();
|
||||
|
||||
switch (ConfigurationState.Instance.Graphics.GraphicsBackend.Value)
|
||||
switch (TitleIDs.SelectGraphicsBackend(titleId, ConfigurationState.Instance.Graphics.GraphicsBackend))
|
||||
{
|
||||
case GraphicsBackend.Auto:
|
||||
EmbeddedWindow =
|
||||
OperatingSystem.IsMacOS() &&
|
||||
RuntimeInformation.ProcessArchitecture == Architecture.Arm64 &&
|
||||
KnownGreatMetalTitles.ContainsIgnoreCase(titleId)
|
||||
? new EmbeddedWindowMetal()
|
||||
: new EmbeddedWindowVulkan();
|
||||
break;
|
||||
case GraphicsBackend.OpenGl:
|
||||
EmbeddedWindow = new EmbeddedWindowOpenGL();
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue