mirror of
https://github.com/ppy/osu
synced 2025-01-19 12:30:50 +00:00
Merge pull request #20480 from peppy/fix-drawable-mutation-tablet-settings
Fix potential crash from incorrect drawable mutation in tablet settings display
This commit is contained in:
commit
f2eed881bd
@ -215,21 +215,21 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
rotation.BindTo(tabletHandler.Rotation);
|
||||
|
||||
areaOffset.BindTo(tabletHandler.AreaOffset);
|
||||
areaOffset.BindValueChanged(val =>
|
||||
areaOffset.BindValueChanged(val => Schedule(() =>
|
||||
{
|
||||
offsetX.Value = val.NewValue.X;
|
||||
offsetY.Value = val.NewValue.Y;
|
||||
}, true);
|
||||
}), true);
|
||||
|
||||
offsetX.BindValueChanged(val => areaOffset.Value = new Vector2(val.NewValue, areaOffset.Value.Y));
|
||||
offsetY.BindValueChanged(val => areaOffset.Value = new Vector2(areaOffset.Value.X, val.NewValue));
|
||||
|
||||
areaSize.BindTo(tabletHandler.AreaSize);
|
||||
areaSize.BindValueChanged(val =>
|
||||
areaSize.BindValueChanged(val => Schedule(() =>
|
||||
{
|
||||
sizeX.Value = val.NewValue.X;
|
||||
sizeY.Value = val.NewValue.Y;
|
||||
}, true);
|
||||
}), true);
|
||||
|
||||
sizeX.BindValueChanged(val =>
|
||||
{
|
||||
@ -255,7 +255,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
});
|
||||
|
||||
tablet.BindTo(tabletHandler.Tablet);
|
||||
tablet.BindValueChanged(val =>
|
||||
tablet.BindValueChanged(val => Schedule(() =>
|
||||
{
|
||||
Scheduler.AddOnce(updateVisibility);
|
||||
|
||||
@ -274,7 +274,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
sizeY.Default = sizeY.MaxValue = tab.Size.Y;
|
||||
|
||||
areaSize.Default = new Vector2(sizeX.Default, sizeY.Default);
|
||||
}, true);
|
||||
}), true);
|
||||
}
|
||||
|
||||
private void updateVisibility()
|
||||
|
Loading…
Reference in New Issue
Block a user