mirror of
https://github.com/osukey/osukey.git
synced 2025-05-19 20:47:24 +09:00
Move out requireMoreUpdateLoops for better consistency
This commit is contained in:
parent
ddef7fa3ba
commit
aeb62825cd
@ -115,17 +115,16 @@ namespace osu.Game.Rulesets.UI
|
|||||||
setClock(); // LoadComplete may not be run yet, but we still want the clock.
|
setClock(); // LoadComplete may not be run yet, but we still want the clock.
|
||||||
|
|
||||||
validState = true;
|
validState = true;
|
||||||
|
requireMoreUpdateLoops = false;
|
||||||
|
|
||||||
var newProposedTime = parentGameplayClock.CurrentTime;
|
var newProposedTime = parentGameplayClock.CurrentTime;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!FrameStablePlayback)
|
if (!FrameStablePlayback)
|
||||||
{
|
|
||||||
requireMoreUpdateLoops = false;
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
else if (firstConsumption)
|
if (firstConsumption)
|
||||||
{
|
{
|
||||||
// On the first update, frame-stability seeking would result in unexpected/unwanted behaviour.
|
// On the first update, frame-stability seeking would result in unexpected/unwanted behaviour.
|
||||||
// Instead we perform an initial seek to the proposed time.
|
// Instead we perform an initial seek to the proposed time.
|
||||||
@ -159,8 +158,6 @@ namespace osu.Game.Rulesets.UI
|
|||||||
|
|
||||||
newProposedTime = newTime.Value;
|
newProposedTime = newTime.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
requireMoreUpdateLoops = manualClock.CurrentTime != parentGameplayClock.CurrentTime;
|
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
@ -171,6 +168,8 @@ namespace osu.Game.Rulesets.UI
|
|||||||
manualClock.Rate = Math.Abs(parentGameplayClock.Rate) * direction;
|
manualClock.Rate = Math.Abs(parentGameplayClock.Rate) * direction;
|
||||||
manualClock.IsRunning = parentGameplayClock.IsRunning;
|
manualClock.IsRunning = parentGameplayClock.IsRunning;
|
||||||
|
|
||||||
|
requireMoreUpdateLoops |= manualClock.CurrentTime != parentGameplayClock.CurrentTime;
|
||||||
|
|
||||||
// The manual clock time has changed in the above code. The framed clock now needs to be updated
|
// The manual clock time has changed in the above code. The framed clock now needs to be updated
|
||||||
// to ensure that the its time is valid for our children before input is processed
|
// to ensure that the its time is valid for our children before input is processed
|
||||||
framedClock.ProcessFrame();
|
framedClock.ProcessFrame();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user