Merge pull request #21612 from peppy/fix-ruleset-config-parsing-failure

Fix parsing of ruleset configuration values being incorrect on some locales
This commit is contained in:
Bartłomiej Dach 2022-12-11 18:30:52 +01:00 committed by GitHub
commit a1d22ef77a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,9 +5,11 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization;
using System.Linq; using System.Linq;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Extensions;
using osu.Game.Configuration; using osu.Game.Configuration;
using osu.Game.Database; using osu.Game.Database;
@ -67,7 +69,7 @@ namespace osu.Game.Rulesets.Configuration
{ {
var setting = r.All<RealmRulesetSetting>().First(s => s.RulesetName == rulesetName && s.Variant == variant && s.Key == c.ToString()); var setting = r.All<RealmRulesetSetting>().First(s => s.RulesetName == rulesetName && s.Variant == variant && s.Key == c.ToString());
setting.Value = ConfigStore[c].ToString(); setting.Value = ConfigStore[c].ToString(CultureInfo.InvariantCulture);
} }
}); });
@ -89,7 +91,7 @@ namespace osu.Game.Rulesets.Configuration
setting = new RealmRulesetSetting setting = new RealmRulesetSetting
{ {
Key = lookup.ToString(), Key = lookup.ToString(),
Value = bindable.Value.ToString(), Value = bindable.ToString(CultureInfo.InvariantCulture),
RulesetName = rulesetName, RulesetName = rulesetName,
Variant = variant, Variant = variant,
}; };