mirror of
https://github.com/TomHarte/CLK.git
synced 2024-07-05 10:28:58 +00:00
Corrects execution cap for splitAndSync ticks.
This commit is contained in:
parent
e6bae261c4
commit
72103a4adb
@ -748,8 +748,8 @@ class MachineDocument:
|
|||||||
|
|
||||||
func openGLViewDidShowOSMouseCursor(_ view: CSOpenGLView) {
|
func openGLViewDidShowOSMouseCursor(_ view: CSOpenGLView) {
|
||||||
// The OS mouse cursor became visible, so show the volume controls.
|
// The OS mouse cursor became visible, so show the volume controls.
|
||||||
volumeView.layer?.removeAllAnimations()
|
|
||||||
animationFader = nil
|
animationFader = nil
|
||||||
|
volumeView.layer?.removeAllAnimations()
|
||||||
volumeView.isHidden = false
|
volumeView.isHidden = false
|
||||||
volumeView.layer?.opacity = 1.0
|
volumeView.layer?.opacity = 1.0
|
||||||
}
|
}
|
||||||
|
@ -779,9 +779,10 @@ struct ActivityObserver: public Activity::Observer {
|
|||||||
|
|
||||||
_timer = [[CSHighPrecisionTimer alloc] initWithTask:^{
|
_timer = [[CSHighPrecisionTimer alloc] initWithTask:^{
|
||||||
// Grab the time now and, therefore, the amount of time since the timer last fired
|
// Grab the time now and, therefore, the amount of time since the timer last fired
|
||||||
// (capped at half a second).
|
// (subject to a cap to avoid potential perpetual regression).
|
||||||
const auto timeNow = Time::nanos_now();
|
const auto timeNow = Time::nanos_now();
|
||||||
const auto duration = std::min(timeNow - lastTime, Time::Nanos(10'000'000'000 / TICKS));
|
lastTime = std::max(timeNow - Time::Nanos(10'000'000'000 / TICKS), lastTime);
|
||||||
|
const auto duration = timeNow - lastTime;
|
||||||
|
|
||||||
CGSize pixelSize;
|
CGSize pixelSize;
|
||||||
BOOL splitAndSync = NO;
|
BOOL splitAndSync = NO;
|
||||||
|
Loading…
Reference in New Issue
Block a user