Merge branch 'master' into profile-beatmaps-section

This commit is contained in:
Dean Herbert 2017-11-13 20:44:57 +09:00 committed by GitHub
commit 97fc4347e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 20 deletions

@ -1 +1 @@
Subproject commit 47aabeaee5a8d85a0e6769fd601736f8dc1eb051
Subproject commit c95b9350edb6305cfefdf08f902f6f73d336736b

View File

@ -76,6 +76,8 @@ public ReplayInputHandler ReplayInputHandler
#region Clock control
protected override bool ShouldProcessClock => false; // We handle processing the clock ourselves
private ManualClock clock;
private IFrameBasedClock parentClock;
@ -151,6 +153,12 @@ protected override void Update()
}
requireMoreUpdateLoops = clock.CurrentTime != parentClock.CurrentTime;
// 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
Clock.ProcessFrame();
// Process input
base.Update();
}

View File

@ -144,22 +144,6 @@ private void load(AudioManager audio, OsuConfigManager config, APIAccess api)
userAudioOffset.ValueChanged += v => offsetClock.Offset = v;
userAudioOffset.TriggerChange();
Task.Run(() =>
{
adjustableSourceClock.Reset();
// this is temporary until we have blocking (async.Wait()) audio component methods.
// then we can call ResetAsync().Wait() or the blocking version above.
while (adjustableSourceClock.IsRunning)
Thread.Sleep(1);
Schedule(() =>
{
decoupledClock.ChangeSource(adjustableSourceClock);
applyRateFromMods();
});
});
Children = new Drawable[]
{
storyboardContainer = new Container
@ -329,10 +313,26 @@ protected override void OnEntering(Screen last)
.Delay(250)
.FadeIn(250);
this.Delay(750).Schedule(() =>
Task.Run(() =>
{
if (!pauseContainer.IsPaused)
decoupledClock.Start();
adjustableSourceClock.Reset();
// this is temporary until we have blocking (async.Wait()) audio component methods.
// then we can call ResetAsync().Wait() or the blocking version above.
while (adjustableSourceClock.IsRunning)
Thread.Sleep(1);
Schedule(() =>
{
decoupledClock.ChangeSource(adjustableSourceClock);
applyRateFromMods();
this.Delay(750).Schedule(() =>
{
if (!pauseContainer.IsPaused)
decoupledClock.Start();
});
});
});
pauseContainer.Alpha = 0;