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:
parent
94bf1d65b6
commit
5f8baf874d
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user