diff --git a/osu.Game/Configuration/DatabasedConfigManager.cs b/osu.Game/Configuration/DatabasedConfigManager.cs index 5505f3d31b..7d045ff6d4 100644 --- a/osu.Game/Configuration/DatabasedConfigManager.cs +++ b/osu.Game/Configuration/DatabasedConfigManager.cs @@ -13,6 +13,8 @@ namespace osu.Game.Configuration { private readonly SettingsStore settings; + private int variant; + private readonly List databasedSettings; private readonly RulesetInfo ruleset; @@ -21,6 +23,7 @@ namespace osu.Game.Configuration { this.settings = settings; this.ruleset = ruleset; + this.variant = variant; databasedSettings = settings.Query(ruleset?.ID, variant); @@ -51,7 +54,8 @@ namespace osu.Game.Configuration { Key = lookup, Value = bindable.Value, - RulesetID = ruleset?.ID + RulesetID = ruleset?.ID, + Variant = variant, }); databasedSettings.Add(setting); diff --git a/osu.Game/Configuration/SettingsStore.cs b/osu.Game/Configuration/SettingsStore.cs index 536b4f5786..9b18151c84 100644 --- a/osu.Game/Configuration/SettingsStore.cs +++ b/osu.Game/Configuration/SettingsStore.cs @@ -30,9 +30,12 @@ namespace osu.Game.Configuration { var context = GetContext(); + var newValue = setting.Value; + Refresh(ref setting); - setting.Value = setting.Value; + setting.Value = newValue; + context.SaveChanges(); SettingChanged?.Invoke();