1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-28 07:29:45 +00:00

Resolves crash upon File -> New..., Cancel; also ensures slow performance can't equal no progression.

This commit is contained in:
Thomas Harte 2020-02-14 23:16:44 -05:00
parent 763159a6f6
commit e1892ff370
2 changed files with 2 additions and 6 deletions

View File

@ -84,7 +84,7 @@ class MachineDocument:
}
override func close() {
machine.stop()
machine?.stop()
activityPanel?.setIsVisible(false)
activityPanel = nil

View File

@ -770,11 +770,7 @@ struct ActivityObserver: public Activity::Observer {
// Grab the time now and, therefore, the amount of time since the timer last fired
// (capped at half a second).
const auto timeNow = Time::nanos_now();
const auto duration = timeNow - lastTime;
if(duration > Time::Nanos(500'000'000)) {
lastTime = timeNow;
return;
}
const auto duration = std::min(timeNow - lastTime, Time::Nanos(10'000'000'000 / TICKS));
CGSize pixelSize;
BOOL splitAndSync = NO;