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

Merge pull request #5801 from peppy/fix-decoding-loop

Fix video decoding loop running permanently in the background
This commit is contained in:
Shane Woolcock 2019-08-22 17:13:30 +09:30 committed by GitHub
commit 76d34967a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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();