osu/osu.Game/Screens
Bartłomiej Dach e937b778f6 Fix potential failure in ensureSourceClockSet()
`ensureSourceClockSet()` was intended to only run when the adjustable
source hasn't been set at all yet. As it turns out permitting it to run
unconditionally can break the state of the underlying interpolated
clock. This is caused by the following factors:

* While the decoupleable clock is running, its `CurrentTime` does not
  come from either the source clock, or the internal stopwatch; it is
  instead calculated using the base `InterpolatingFramedClock` logic.

* A source change of a decoupleable clock seeks the provided source
  clock to the decoupleable's current time.

* When an interpolating clock is seeked (decoupleable clock is also
  an interpolating one), its interpolation state
  (`{Last,Current}InterpolatedTime`) are reset to 0.

* If the interpolating clock determines that its current time is too
  far away from the source's time (which was set when the source is
  changed), it will ignore the source and instead continue to use
  its current time until the source clock has caught up.

Overall, the source change is not really necessary if a source is
already there. The only reason to ensure it was set was to make sure
the first seek of the gameplay clock wasn't performed in decoupled
mode. Therefore, add a guard to make sure the source is only set if
there isn't one already.
2021-04-24 14:19:39 +02:00
..
Backgrounds Move default IgnoreUserSettings value to construction 2021-04-15 08:04:03 +03:00
Edit Merge pull request #12531 from peppy/editor-add-nudge-shortcuts 2021-04-22 21:14:51 +09:00
Import
Menu
OnlinePlay Merge branch 'master' into fix-editor-alt-scroll 2021-04-13 19:36:25 +09:00
Play Fix potential failure in ensureSourceClockSet() 2021-04-24 14:19:39 +02:00
Ranking Remove empty <returns> xmldoc 2021-04-12 17:46:14 +09:00
Select Merge pull request #12353 from nekodex/songselect-hoversamples 2021-04-10 01:45:47 +09:00
Spectate Fix potentially starting play when finished 2021-04-20 21:19:08 +09:00
BackgroundScreen.cs
BackgroundScreenStack.cs
IHandlePresentBeatmap.cs
IHasSubScreenStack.cs
IOsuScreen.cs
Loader.cs
OsuScreen.cs
OsuScreenDependencies.cs
OsuScreenStack.cs
ScorePresentType.cs
ScreenWhiteBox.cs
StartupScreen.cs