1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 12:47:25 +08:00

Fix display settings binding to configuration bindables in async load

This commit is contained in:
Dean Herbert 2021-01-05 18:19:28 +09:00
parent 3b98782964
commit d0d2e41b28

View File

@ -133,6 +133,15 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
},
};
scalingSettings.ForEach(s => bindPreviewEvent(s.Current));
}
protected override void LoadComplete()
{
base.LoadComplete();
windowModeDropdown.Current.ValueChanged += _ => updateResolutionDropdown();
windowModes.BindCollectionChanged((sender, args) =>
{
if (windowModes.Count > 1)
@ -141,8 +150,6 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
windowModeDropdown.Hide();
}, true);
windowModeDropdown.Current.ValueChanged += _ => updateResolutionDropdown();
currentDisplay.BindValueChanged(display => Schedule(() =>
{
resolutions.RemoveRange(1, resolutions.Count - 1);
@ -159,8 +166,6 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
updateResolutionDropdown();
}), true);
scalingSettings.ForEach(s => bindPreviewEvent(s.Current));
scalingMode.BindValueChanged(mode =>
{
scalingSettings.ClearTransforms();