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:
parent
3b9318e894
commit
7a2420ead2
@ -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);
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user