Fixed a ban where a custom setting was mistakenly created when starting the game if it did not exist.

Now when starting the game, if a custom setting was created, the current game will be displayed in the settings window.
Code cleanup.
This commit is contained in:
Vova
2025-02-08 18:29:31 +10:00
parent a92475b8fd
commit 5f5c76107c
9 changed files with 55 additions and 60 deletions

View File

@@ -134,9 +134,25 @@ namespace Ryujinx.Ava.UI.Views.Main
Window.SettingsWindow = new(Window.VirtualFileSystem, Window.ContentManager);
Rainbow.Enable();
await Window.SettingsWindow.ShowDialog(Window);
if (ViewModel.SelectedApplication is null)
{
await Window.SettingsWindow.ShowDialog(Window);
}
else
{
bool userConfigExist = Program.FindGameConfig(Program.GetDirGameUserConfig(ViewModel.SelectedApplication.IdString, false, false));
if (!ViewModel.IsGameRunning || !userConfigExist)
{
await Window.SettingsWindow.ShowDialog(Window);
}
else
{
await new UserConfigWindows(ViewModel, userConfigExist).ShowDialog((Window)ViewModel.TopLevel);
}
}
Rainbow.Disable();
Rainbow.Reset();