1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-18 11:02:57 +08:00

Ensure storyboards are still updated even when dim is 100%

This avoids piled-up overhead when entering break time. It's not great,
but it is what we need for now to avoid weirdness.
This commit is contained in:
Dean Herbert 2025-01-14 15:55:29 +09:00
parent 7761a0c18a
commit 77db355809
No known key found for this signature in database

View File

@ -69,7 +69,22 @@ namespace osu.Game.Screens.Play
protected override void LoadComplete()
{
ShowStoryboard.BindValueChanged(_ => initializeStoryboard(true), true);
ShowStoryboard.BindValueChanged(show =>
{
initializeStoryboard(true);
if (drawableStoryboard != null)
{
// Regardless of user dim setting, for the time being we need to ensure storyboards are still updated in the background (even if not displayed).
// If we don't do this, an intensive storyboard will have a lot of catch-up work to do at the start of a break, causing a huge stutter.
//
// This can be reconsidered when https://github.com/ppy/osu-framework/issues/6491 is resolved.
bool alwaysPresent = show.NewValue;
Content.AlwaysPresent = alwaysPresent;
drawableStoryboard.AlwaysPresent = alwaysPresent;
}
}, true);
base.LoadComplete();
}