merge with upstream

This commit is contained in:
uncavo-hdmi
2025-03-01 09:11:06 +01:00
172 changed files with 1899 additions and 15568 deletions

View File

@@ -33,7 +33,6 @@ using Ryujinx.Common.Utilities;
using Ryujinx.Graphics.GAL;
using Ryujinx.Graphics.GAL.Multithreading;
using Ryujinx.Graphics.Gpu;
using Ryujinx.Graphics.Metal;
using Ryujinx.Graphics.OpenGL;
using Ryujinx.Graphics.Vulkan;
using Ryujinx.HLE;
@@ -892,14 +891,10 @@ namespace Ryujinx.Ava
VirtualFileSystem.ReloadKeySet();
// Initialize Renderer.
GraphicsBackend backend = TitleIDs.SelectGraphicsBackend(ApplicationId.ToString("X16"), ConfigurationState.Instance.Graphics.GraphicsBackend);
GraphicsBackend backend = ConfigurationState.Instance.Graphics.GraphicsBackend;
IRenderer renderer = backend switch
{
#pragma warning disable CA1416 // This call site is reachable on all platforms
// SelectGraphicsBackend does a check for Mac, on top of checking if it's an ARM Mac. This isn't a problem.
GraphicsBackend.Metal => new MetalRenderer((RendererHost.EmbeddedWindow as EmbeddedWindowMetal)!.CreateSurface),
#pragma warning restore CA1416
GraphicsBackend.Vulkan => VulkanRenderer.Create(
ConfigurationState.Instance.Graphics.PreferredGpu,
(RendererHost.EmbeddedWindow as EmbeddedWindowVulkan)!.CreateSurface,
@@ -951,7 +946,7 @@ namespace Ryujinx.Ava
ConfigurationState.Instance.Multiplayer.Mode,
ConfigurationState.Instance.Multiplayer.DisableP2p,
ConfigurationState.Instance.Multiplayer.LdnPassphrase,
ConfigurationState.Instance.Multiplayer.LdnServer,
ConfigurationState.Instance.Multiplayer.GetLdnServer(),
ConfigurationState.Instance.Graphics.CustomVSyncInterval.Value,
ConfigurationState.Instance.Hacks.ShowDirtyHacks ? ConfigurationState.Instance.Hacks.EnabledHacks : null));
}
@@ -1118,6 +1113,13 @@ namespace Ryujinx.Ava
});
(RendererHost.EmbeddedWindow as EmbeddedWindowOpenGL)?.MakeCurrent(true);
// Reload settings when the game is turned off
// (resets custom settings if there were any)
Program.ReloadConfig();
// Reload application list (changes the status of the user setting if it was added or removed during the game)
Dispatcher.UIThread.Post(() => RyujinxApp.MainWindow.LoadApplications());
}
public void InitStatus()
@@ -1126,7 +1128,6 @@ namespace Ryujinx.Ava
{
GraphicsBackend.Vulkan => "Vulkan",
GraphicsBackend.OpenGl => "OpenGL",
GraphicsBackend.Metal => "Metal",
_ => throw new NotImplementedException()
};