1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 15:32:54 +08:00

Use interpolatedSourceClock's IsRunning value for consistency.

This commit is contained in:
Dean Herbert 2017-04-13 18:31:23 +09:00
parent 94bf1d65b6
commit 5f8baf874d
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49

View File

@ -35,7 +35,7 @@ namespace osu.Game.Screens.Play
public BeatmapInfo BeatmapInfo; public BeatmapInfo BeatmapInfo;
public bool IsPaused => !sourceClock.IsRunning; public bool IsPaused => !interpolatedSourceClock.IsRunning;
public bool HasFailed { get; private set; } public bool HasFailed { get; private set; }
@ -206,12 +206,12 @@ namespace osu.Game.Screens.Play
{ {
if (!canPause && !force) return; if (!canPause && !force) return;
sourceClock.Stop();
// the actual pausing is potentially happening on a different thread. // the actual pausing is potentially happening on a different thread.
// we want to wait for the source clock to stop so we can be sure all components are in a stable state. // we want to wait for the source clock to stop so we can be sure all components are in a stable state.
if (!IsPaused) if (!IsPaused)
{ {
sourceClock.Stop();
Schedule(() => Pause(force)); Schedule(() => Pause(force));
return; return;
} }