mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 17:49:33 +00:00
dt can be negative on simulator reset
This commit is contained in:
parent
94b483cda6
commit
c77c25ef4e
@ -7,8 +7,8 @@ void step()
|
|||||||
dt = now - t;
|
dt = now - t;
|
||||||
t = now;
|
t = now;
|
||||||
|
|
||||||
if (isnan(dt)) {
|
if (!(dt > 0)) {
|
||||||
dt = 0; // assume dt to be zero on first step
|
dt = 0; // assume dt to be zero on first step and on reset
|
||||||
}
|
}
|
||||||
|
|
||||||
computeLoopFreq();
|
computeLoopFreq();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user