From 7a72f2e3f558f6ec765582dbdc74cc1965dfcdb4 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Sat, 14 Oct 2017 05:15:18 +0300 Subject: [PATCH] Make sure we restore the clock rate on exiting --- osu.Game/Screens/Play/Player.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 7af260135e..c0a50b1a6f 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -49,6 +49,7 @@ namespace osu.Game.Screens.Play private IAdjustableClock adjustableSourceClock; private FramedOffsetClock offsetClock; private DecoupleableInterpolatingFramedClock decoupledClock; + private double clockRate; private PauseContainer pauseContainer; @@ -149,6 +150,8 @@ namespace osu.Game.Screens.Play foreach (var mod in working.Mods.Value.OfType()) mod.ApplyToClock(adjustableSourceClock); + clockRate = adjustableSourceClock.Rate; + decoupledClock.ChangeSource(adjustableSourceClock); }); @@ -334,6 +337,8 @@ namespace osu.Game.Screens.Play { if (HasFailed || !ValidForResume || pauseContainer?.AllowExit != false || RulesetContainer?.HasReplayLoaded != false) { + // We want to make sure we restore the clock rate + adjustableSourceClock.Rate = clockRate; fadeOut(); return base.OnExiting(next); }