Enabled per-game configuration of discord presence
This commit is contained in:
parent
1ec039060e
commit
ced618d9a1
@ -26,16 +26,12 @@
|
|||||||
Spacing="10">
|
Spacing="10">
|
||||||
<TextBlock Classes="h1" Text="{ext:Locale SettingsTabGeneralGeneral}" />
|
<TextBlock Classes="h1" Text="{ext:Locale SettingsTabGeneralGeneral}" />
|
||||||
<StackPanel Margin="10,0,0,0" Orientation="Vertical">
|
<StackPanel Margin="10,0,0,0" Orientation="Vertical">
|
||||||
<CheckBox
|
<CheckBox IsChecked="{Binding EnableDiscordIntegration}">
|
||||||
IsEnabled="{Binding !IsGameTitleNotNull}"
|
<StackPanel Orientation="Horizontal">
|
||||||
Opacity="{Binding PanelOpacity}"
|
<TextBlock VerticalAlignment="Center"
|
||||||
IsChecked="{Binding EnableDiscordIntegration}">
|
ToolTip.Tip="{ext:Locale ToggleDiscordTooltip}"
|
||||||
<StackPanel Orientation="Horizontal">
|
Text="{ext:Locale SettingsTabGeneralEnableDiscordRichPresence}" />
|
||||||
<TextBlock VerticalAlignment="Center"
|
</StackPanel>
|
||||||
ToolTip.Tip="{ext:Locale ToggleDiscordTooltip}"
|
|
||||||
Text="{ext:Locale SettingsTabGeneralEnableDiscordRichPresence}" />
|
|
||||||
<TextBlock Classes="globalConfigMarker" IsVisible="{Binding IsGameTitleNotNull}" />
|
|
||||||
</StackPanel>
|
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<CheckBox
|
<CheckBox
|
||||||
IsEnabled="{Binding !IsGameTitleNotNull}"
|
IsEnabled="{Binding !IsGameTitleNotNull}"
|
||||||
|
@ -21,12 +21,7 @@ namespace Ryujinx.Ava.Utilities.Configuration
|
|||||||
public void Load(ConfigurationFileFormat cff, string configurationFilePath, string titleId = "")
|
public void Load(ConfigurationFileFormat cff, string configurationFilePath, string titleId = "")
|
||||||
{
|
{
|
||||||
bool configurationFileUpdated = false;
|
bool configurationFileUpdated = false;
|
||||||
bool shouldLoadFromFile = true;
|
bool shouldLoadFromFile = string.IsNullOrEmpty(titleId);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(titleId))
|
|
||||||
{
|
|
||||||
shouldLoadFromFile = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cff.Version is < 0 or > ConfigurationFileFormat.CurrentVersion)
|
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
|
CheckUpdatesOnStart.Value = shouldLoadFromFile ? cff.CheckUpdatesOnStart : CheckUpdatesOnStart.Value; // Get from global config only
|
||||||
UpdateCheckerType.Value = shouldLoadFromFile ? cff.UpdateCheckerType : UpdateCheckerType.Value; // Get from global config only
|
UpdateCheckerType.Value = shouldLoadFromFile ? cff.UpdateCheckerType : UpdateCheckerType.Value; // Get from global config only
|
||||||
FocusLostActionType.Value = cff.FocusLostActionType;
|
FocusLostActionType.Value = cff.FocusLostActionType;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user