1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 16:12:54 +08:00

Fix a couple of regressions

This commit is contained in:
Dean Herbert 2018-01-26 08:21:09 +09:00
parent 3b9318e894
commit 7a2420ead2
2 changed files with 9 additions and 2 deletions

View File

@ -13,6 +13,8 @@ namespace osu.Game.Configuration
{
private readonly SettingsStore settings;
private int variant;
private readonly List<DatabasedSetting> 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);

View File

@ -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();