Fix video decoding loop running permanently in the background

This commit is contained in:
Dean Herbert 2019-08-22 13:48:27 +09:00
parent 04178058fb
commit db1ff6d211

View File

@ -139,7 +139,7 @@ namespace osu.Game.Screens.Menu
private RulesetFlow rulesets;
private Container rulesetsScale;
private Drawable logoContainerSecondary;
private Drawable logoContainer;
private Drawable lazerLogo;
private GlitchingTriangles triangles;
@ -191,7 +191,7 @@ namespace osu.Game.Screens.Menu
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Child = logoContainer = new LazerLogo(textures.GetStream("Menu/logo-triangles.mp4"))
Child = lazerLogo = new LazerLogo(textures.GetStream("Menu/logo-triangles.mp4"))
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
@ -222,7 +222,7 @@ namespace osu.Game.Screens.Menu
const float scale_adjust = 0.8f;
rulesets.Hide();
logoContainer.Hide();
lazerLogo.Hide();
background.Hide();
using (BeginAbsoluteSequence(0, true))
@ -269,14 +269,17 @@ namespace osu.Game.Screens.Menu
rulesets.FadeOut();
// matching flyte curve y = 0.25x^2 + (max(0, x - 0.7) / 0.3) ^ 5
logoContainer.FadeIn().ScaleTo(scale_start).Then().Delay(logo_scale_duration * 0.7f).ScaleTo(scale_start - scale_adjust, logo_scale_duration * 0.3f, Easing.InQuint);
lazerLogo.FadeIn().ScaleTo(scale_start).Then().Delay(logo_scale_duration * 0.7f).ScaleTo(scale_start - scale_adjust, logo_scale_duration * 0.3f, Easing.InQuint);
logoContainerSecondary.ScaleTo(scale_start).Then().ScaleTo(scale_start - scale_adjust * 0.25f, logo_scale_duration, Easing.InQuad);
}
using (BeginDelayedSequence(logo_2, true))
{
logoContainer.FadeOut().OnComplete(_ =>
lazerLogo.FadeOut().OnComplete(_ =>
{
lazerLogo.Expire();
lazerLogo.Dispose(); // explicit disposal as we are pushing a new screen and the expire may not get run.
logo.FadeIn();
background.FadeIn();