mirror of
https://github.com/ppy/osu
synced 2024-12-14 19:06:07 +00:00
Schedule play button state update
Revealed by the framework-side transform thread safety checks. `Stopped` is even annotated as not being thread-safe (but was annotated as such long after the class's nascence).
This commit is contained in:
parent
8a7a1fc40a
commit
52789118a3
@ -142,7 +142,9 @@ namespace osu.Game.Overlays.BeatmapListing.Panels
|
||||
|
||||
AddInternal(preview);
|
||||
loading = false;
|
||||
preview.Stopped += () => Playing.Value = false;
|
||||
// make sure that the update of value of Playing (and the ensuing value change callbacks)
|
||||
// are marshaled back to the update thread.
|
||||
preview.Stopped += () => Schedule(() => Playing.Value = false);
|
||||
|
||||
// user may have changed their mind.
|
||||
if (Playing.Value)
|
||||
|
Loading…
Reference in New Issue
Block a user