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

Fix potential cross-thread talk from bindable updates

This commit is contained in:
Dean Herbert 2019-07-15 11:48:33 +09:00
parent 2186ffda55
commit 12e7668afc

View File

@ -1,4 +1,4 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
@ -168,6 +168,12 @@ namespace osu.Game.Screens.Backgrounds
private void load(OsuConfigManager config)
{
userBlurLevel = config.GetBindable<double>(OsuSetting.BlurLevel);
}
protected override void LoadComplete()
{
base.LoadComplete();
userBlurLevel.ValueChanged += _ => UpdateVisuals();
BlurAmount.ValueChanged += _ => UpdateVisuals();
}