mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 19:32:55 +08:00
Move screen activity update to LoadComplete()
Fixes a potential crash when moving from main menu to editor after having previously opened the login settings overlay. Setting the activity in BDL as done before is unsafe, as that set can trigger value change callbacks, which in turn can trigger adding transforms, which should always be done on the update thread. Semantically it also makes sense, as the user activity should change once the screen they're moving to has actually loaded and displayed to the user.
This commit is contained in:
parent
8a7a1fc40a
commit
284d30d336
@ -143,7 +143,11 @@ namespace osu.Game.Screens
|
||||
private void load(OsuGame osu, AudioManager audio)
|
||||
{
|
||||
sampleExit = audio.Samples.Get(@"UI/screen-back");
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
Activity.Value ??= InitialActivity;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user