1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 11:27:24 +08:00
osu-lazer/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 Apply ConfigureAwait changes to game side 2021-03-08 14:36:35 +09:00
Menu Remove iOS multiplayer blocking code 2021-03-08 14:35:22 +09:00
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 Fix potential cross-thread drawable mutation in IntroTriangles 2021-03-08 13:30:07 +09:00
BackgroundScreenStack.cs Turn on warnings, resolve issues 2019-04-25 17:36:17 +09:00
IHandlePresentBeatmap.cs Remove explicit public definition 2021-03-03 19:03:45 +09:00
IHasSubScreenStack.cs Add the ability for PerformFromMenuRunner to inspect nested screen stacks 2021-02-19 17:58:04 +09:00
IOsuScreen.cs Extract UserActivity logic to OsuGame. 2020-11-08 12:29:52 +01:00
Loader.cs Add original sprite and visualiser 2020-06-02 21:06:41 +02:00
OsuScreen.cs Initial sample + samplechannel rework 2021-01-19 17:11:40 +09:00
OsuScreenDependencies.cs Fix OsuScreenDependencies not caching non-leased versions 2019-12-13 20:05:54 +09:00
OsuScreenStack.cs Simplify the way multiple subscreens handle their disable states via a custom stack 2020-02-06 14:22:01 +09:00
ScorePresentType.cs Update class exclusion for dynamic compilation 2020-09-04 20:41:08 +09:00
ScreenWhiteBox.cs .NET Standard 2.1 implements Math.Clamp , use it instead of MathHelper.Clamp from osuTK. 2019-11-20 13:37:47 +01:00
StartupScreen.cs Cast base immutable bindable to mutable for testing purposes and make InitialOverlayActivationMode property protected 2020-08-31 11:26:55 +02:00