Custom configuration for each game #632

Merged
Goodfeat merged 75 commits from master into master 2025-02-26 03:11:20 +00:00
2 changed files with 8 additions and 17 deletions
Showing only changes of commit ced618d9a1 - Show all commits

View File

@ -26,16 +26,12 @@
Spacing="10">
<TextBlock Classes="h1" Text="{ext:Locale SettingsTabGeneralGeneral}" />
<StackPanel Margin="10,0,0,0" Orientation="Vertical">
<CheckBox
IsEnabled="{Binding !IsGameTitleNotNull}"
Opacity="{Binding PanelOpacity}"
IsChecked="{Binding EnableDiscordIntegration}">
<StackPanel Orientation="Horizontal">
<TextBlock VerticalAlignment="Center"
ToolTip.Tip="{ext:Locale ToggleDiscordTooltip}"
Text="{ext:Locale SettingsTabGeneralEnableDiscordRichPresence}" />
<TextBlock Classes="globalConfigMarker" IsVisible="{Binding IsGameTitleNotNull}" />
</StackPanel>
<CheckBox IsChecked="{Binding EnableDiscordIntegration}">
<StackPanel Orientation="Horizontal">
<TextBlock VerticalAlignment="Center"
ToolTip.Tip="{ext:Locale ToggleDiscordTooltip}"
Text="{ext:Locale SettingsTabGeneralEnableDiscordRichPresence}" />
</StackPanel>
</CheckBox>
<CheckBox
IsEnabled="{Binding !IsGameTitleNotNull}"

View File

@ -21,12 +21,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
public void Load(ConfigurationFileFormat cff, string configurationFilePath, string titleId = "")
{
bool configurationFileUpdated = false;
bool shouldLoadFromFile = true;
if (!string.IsNullOrEmpty(titleId))
{
shouldLoadFromFile = false;
}
bool shouldLoadFromFile = string.IsNullOrEmpty(titleId);
if (cff.Version is < 0 or > ConfigurationFileFormat.CurrentVersion)
{
@ -50,7 +45,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
}
EnableDiscordIntegration.Value = shouldLoadFromFile ? cff.EnableDiscordIntegration : EnableDiscordIntegration.Value; // Get from global config only
EnableDiscordIntegration.Value = cff.EnableDiscordIntegration;
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 = cff.FocusLostActionType;