diff --git a/src/Ryujinx/Assets/Styles/Styles.xaml b/src/Ryujinx/Assets/Styles/Styles.xaml
index cf9f28f02..d75f140ad 100644
--- a/src/Ryujinx/Assets/Styles/Styles.xaml
+++ b/src/Ryujinx/Assets/Styles/Styles.xaml
@@ -46,6 +46,8 @@
+
@@ -337,6 +339,14 @@
+
+
+
+
+
diff --git a/src/Ryujinx/Program.cs b/src/Ryujinx/Program.cs
index cc748087e..b13eab404 100644
--- a/src/Ryujinx/Program.cs
+++ b/src/Ryujinx/Program.cs
@@ -169,6 +169,11 @@ namespace Ryujinx.Ava
public static string GetDirGameUserConfig(string gameId, bool rememberGlobalDir = false, bool changeFolderForGame = false)
{
+ if (string.IsNullOrEmpty(gameId))
+ {
+ return "";
+ }
+
string gameDir = Path.Combine(AppDataManager.GamesDirPath, gameId, ReleaseInformation.ConfigName);
// Should load with the game if there is a custom setting for the game
diff --git a/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs b/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs
index db02543cc..ff675ab2a 100644
--- a/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs
+++ b/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs
@@ -81,6 +81,8 @@ namespace Ryujinx.Ava.UI.ViewModels
public string GamePath => _gamePath;
public string GameTitle => _gameTitle;
public string GameId => _gameId;
+ public bool IsGameTitleNotNull => !string.IsNullOrEmpty(GameTitle);
+ public double PanelOpacity => IsGameTitleNotNull ? 0.5 : 1;
public int ResolutionScale
{
@@ -422,10 +424,8 @@ namespace Ryujinx.Ava.UI.ViewModels
{
Task.Run(LoadAvailableGpus);
- if (!noLoadGlobalConfig)// Default is false, but loading custom config avoids double call
- {
+ // if (!noLoadGlobalConfig)// Default is false, but loading custom config avoids double call
LoadCurrentConfiguration();
- }
DirtyHacks = new SettingsHacksViewModel(this);
}
@@ -536,35 +536,29 @@ namespace Ryujinx.Ava.UI.ViewModels
{
ConfigurationState config = ConfigurationState.Instance;
+ // User Interface
+ EnableDiscordIntegration = config.EnableDiscordIntegration;
+ CheckUpdatesOnStart = config.CheckUpdatesOnStart;
+ ShowConfirmExit = config.ShowConfirmExit;
+ RememberWindowState = config.RememberWindowState;
+ ShowTitleBar = config.ShowTitleBar;
+ HideCursor = (int)config.HideCursor.Value;
+ UpdateCheckerType = (int)config.UpdateCheckerType.Value;
+ FocusLostActionType = (int)config.FocusLostActionType.Value;
- //It is necessary that the data is used from the global configuration file
- if (string.IsNullOrEmpty(GameId))
+ GameDirectories.Clear();
+ GameDirectories.AddRange(config.UI.GameDirs.Value);
+
+ AutoloadDirectories.Clear();
+ AutoloadDirectories.AddRange(config.UI.AutoloadDirs.Value);
+
+ BaseStyleIndex = config.UI.BaseStyle.Value switch
{
- // User Interface
- EnableDiscordIntegration = config.EnableDiscordIntegration;
- CheckUpdatesOnStart = config.CheckUpdatesOnStart;
- ShowConfirmExit = config.ShowConfirmExit;
- RememberWindowState = config.RememberWindowState;
- ShowTitleBar = config.ShowTitleBar;
- HideCursor = (int)config.HideCursor.Value;
- UpdateCheckerType = (int)config.UpdateCheckerType.Value;
- FocusLostActionType = (int)config.FocusLostActionType.Value;
-
- GameDirectories.Clear();
- GameDirectories.AddRange(config.UI.GameDirs.Value);
-
- AutoloadDirectories.Clear();
- AutoloadDirectories.AddRange(config.UI.AutoloadDirs.Value);
-
- BaseStyleIndex = config.UI.BaseStyle.Value switch
- {
- "Auto" => 0,
- "Light" => 1,
- "Dark" => 2,
- _ => 0
- };
-
- }
+ "Auto" => 0,
+ "Light" => 1,
+ "Dark" => 2,
+ _ => 0
+ };
// Input
EnableDockedMode = config.System.EnableDockedMode;
@@ -585,6 +579,7 @@ namespace Ryujinx.Ava.UI.ViewModels
DateTime currentDateTime = currentHostDateTime.Add(systemDateTimeOffset);
CurrentDate = currentDateTime.Date;
CurrentTime = currentDateTime.TimeOfDay;
+
MatchSystemTime = config.System.MatchSystemTime;
EnableCustomVSyncInterval = config.Graphics.EnableCustomVSyncInterval;
@@ -645,11 +640,10 @@ namespace Ryujinx.Ava.UI.ViewModels
LdnPassphrase = config.Multiplayer.LdnPassphrase;
LdnServer = config.Multiplayer.LdnServer;
}
-
+
public void SaveSettings()
{
ConfigurationState config = ConfigurationState.Instance;
- bool userConfigFile = string.IsNullOrEmpty(GameId);
// User Interface
config.EnableDiscordIntegration.Value = EnableDiscordIntegration;
@@ -660,17 +654,16 @@ namespace Ryujinx.Ava.UI.ViewModels
config.HideCursor.Value = (HideCursorMode)HideCursor;
config.UpdateCheckerType.Value = (UpdaterType)UpdateCheckerType;
config.FocusLostActionType.Value = (FocusLostType)FocusLostActionType;
- config.UI.GameDirs.Value = [..GameDirectories];
- config.UI.AutoloadDirs.Value = [..AutoloadDirectories];
+ config.UI.GameDirs.Value = [.. GameDirectories];
+ config.UI.AutoloadDirs.Value = [.. AutoloadDirectories];
-
- config.UI.BaseStyle.Value = BaseStyleIndex switch
- {
- 0 => "Auto",
- 1 => "Light",
- 2 => "Dark",
- _ => "Auto"
- };
+ config.UI.BaseStyle.Value = BaseStyleIndex switch
+ {
+ 0 => "Auto",
+ 1 => "Light",
+ 2 => "Dark",
+ _ => "Auto"
+ };
// Input
config.System.EnableDockedMode.Value = EnableDockedMode;
@@ -683,10 +676,10 @@ namespace Ryujinx.Ava.UI.ViewModels
// System
config.System.Region.Value = (Region)Region;
-
+
if (config.System.Language.Value != (Language)Language)
GameListNeedsRefresh = true;
-
+
config.System.Language.Value = (Language)Language;
if (_validTzRegions.Contains(TimeZone))
{
@@ -765,15 +758,13 @@ namespace Ryujinx.Ava.UI.ViewModels
config.Multiplayer.DisableP2p.Value = DisableP2P;
config.Multiplayer.LdnPassphrase.Value = LdnPassphrase;
config.Multiplayer.LdnServer.Value = LdnServer;
-
+
// Dirty Hacks
config.Hacks.Xc2MenuSoftlockFix.Value = DirtyHacks.Xc2MenuSoftlockFix;
config.Hacks.EnableShaderTranslationDelay.Value = DirtyHacks.ShaderTranslationDelayEnabled;
config.Hacks.ShaderTranslationDelay.Value = DirtyHacks.ShaderTranslationDelay;
-
- config.ToFileFormat().SaveConfig(Program.ConfigurationPath);
-
+ config.ToFileFormat().SaveConfig(Program.ConfigurationPath);
MainWindow.UpdateGraphicsConfig();
RyujinxApp.MainWindow.ViewModel.VSyncModeSettingChanged();
diff --git a/src/Ryujinx/UI/Views/Settings/SettingsSystemView.axaml b/src/Ryujinx/UI/Views/Settings/SettingsSystemView.axaml
index 7a9a55848..5a9f98ae5 100644
--- a/src/Ryujinx/UI/Views/Settings/SettingsSystemView.axaml
+++ b/src/Ryujinx/UI/Views/Settings/SettingsSystemView.axaml
@@ -162,6 +162,8 @@
ValueMemberBinding="{Binding Mode=OneWay, Converter={x:Static helpers:TimeZoneConverter.Instance}}" />
+
+
-
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
-
+
+
+
+
+
-
+
@@ -64,7 +90,11 @@
-
+
@@ -81,8 +111,11 @@
+
-
+
@@ -100,7 +133,11 @@
-
+
+
+
-
+
+
+
+
-
+
+
+
+
+
@@ -80,6 +81,11 @@
+
+ Classes="global"/>
diff --git a/src/Ryujinx/UI/Windows/GameSpecificSettingsWindow.axaml.cs b/src/Ryujinx/UI/Windows/GameSpecificSettingsWindow.axaml.cs
index f5e8d3733..ba4da26ef 100644
--- a/src/Ryujinx/UI/Windows/GameSpecificSettingsWindow.axaml.cs
+++ b/src/Ryujinx/UI/Windows/GameSpecificSettingsWindow.axaml.cs
@@ -75,6 +75,10 @@ namespace Ryujinx.Ava.UI.Windows
{
switch (navItem.Tag.ToString())
{
+ case nameof(UiPage):
+ UiPage.ViewModel = ViewModel;
+ NavPanel.Content = UiPage;
+ break;
case nameof(InputPage):
NavPanel.Content = InputPage;
break;
diff --git a/src/Ryujinx/Utilities/Configuration/ConfigurationState.Migration.cs b/src/Ryujinx/Utilities/Configuration/ConfigurationState.Migration.cs
index 8ead03480..bd145e048 100644
--- a/src/Ryujinx/Utilities/Configuration/ConfigurationState.Migration.cs
+++ b/src/Ryujinx/Utilities/Configuration/ConfigurationState.Migration.cs
@@ -53,12 +53,12 @@ namespace Ryujinx.Ava.Utilities.Configuration
EnableDiscordIntegration.Value = shouldLoadFromFile ? cff.EnableDiscordIntegration : EnableDiscordIntegration.Value; // Get from global config only
CheckUpdatesOnStart.Value = shouldLoadFromFile ? cff.CheckUpdatesOnStart : CheckUpdatesOnStart.Value; // Get from global config only
UpdateCheckerType.Value = shouldLoadFromFile ? cff.UpdateCheckerType : UpdateCheckerType.Value; // Get from global config only
- FocusLostActionType.Value = shouldLoadFromFile ? cff.FocusLostActionType : FocusLostActionType.Value; // Get from global config only
+ FocusLostActionType.Value = cff.FocusLostActionType;
ShowConfirmExit.Value = shouldLoadFromFile ? cff.ShowConfirmExit : ShowConfirmExit.Value; // Get from global config only
RememberWindowState.Value = shouldLoadFromFile ? cff.RememberWindowState : RememberWindowState.Value; // Get from global config only
ShowTitleBar.Value = shouldLoadFromFile ? cff.ShowTitleBar : ShowTitleBar.Value; // Get from global config only
EnableHardwareAcceleration.Value = shouldLoadFromFile ? cff.EnableHardwareAcceleration : EnableHardwareAcceleration.Value; // Get from global config only
- HideCursor.Value = shouldLoadFromFile ? cff.HideCursor : HideCursor.Value; // Get from global config only
+ HideCursor.Value = cff.HideCursor;
Logger.EnableFileLog.Value = cff.EnableFileLog;
Logger.EnableDebug.Value = cff.LoggingEnableDebug;