mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 03:22: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 readonly SettingsStore settings;
|
||||||
|
|
||||||
|
private int variant;
|
||||||
|
|
||||||
private readonly List<DatabasedSetting> databasedSettings;
|
private readonly List<DatabasedSetting> databasedSettings;
|
||||||
|
|
||||||
private readonly RulesetInfo ruleset;
|
private readonly RulesetInfo ruleset;
|
||||||
@ -21,6 +23,7 @@ namespace osu.Game.Configuration
|
|||||||
{
|
{
|
||||||
this.settings = settings;
|
this.settings = settings;
|
||||||
this.ruleset = ruleset;
|
this.ruleset = ruleset;
|
||||||
|
this.variant = variant;
|
||||||
|
|
||||||
databasedSettings = settings.Query(ruleset?.ID, variant);
|
databasedSettings = settings.Query(ruleset?.ID, variant);
|
||||||
|
|
||||||
@ -51,7 +54,8 @@ namespace osu.Game.Configuration
|
|||||||
{
|
{
|
||||||
Key = lookup,
|
Key = lookup,
|
||||||
Value = bindable.Value,
|
Value = bindable.Value,
|
||||||
RulesetID = ruleset?.ID
|
RulesetID = ruleset?.ID,
|
||||||
|
Variant = variant,
|
||||||
});
|
});
|
||||||
|
|
||||||
databasedSettings.Add(setting);
|
databasedSettings.Add(setting);
|
||||||
|
@ -30,9 +30,12 @@ namespace osu.Game.Configuration
|
|||||||
{
|
{
|
||||||
var context = GetContext();
|
var context = GetContext();
|
||||||
|
|
||||||
|
var newValue = setting.Value;
|
||||||
|
|
||||||
Refresh(ref setting);
|
Refresh(ref setting);
|
||||||
|
|
||||||
setting.Value = setting.Value;
|
setting.Value = newValue;
|
||||||
|
|
||||||
context.SaveChanges();
|
context.SaveChanges();
|
||||||
|
|
||||||
SettingChanged?.Invoke();
|
SettingChanged?.Invoke();
|
||||||
|
Loading…
Reference in New Issue
Block a user