mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 09:39: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;
|
||||
t = now;
|
||||
|
||||
if (isnan(dt)) {
|
||||
dt = 0; // assume dt to be zero on first step
|
||||
if (!(dt > 0)) {
|
||||
dt = 0; // assume dt to be zero on first step and on reset
|
||||
}
|
||||
|
||||
computeLoopFreq();
|
||||
|
Loading…
x
Reference in New Issue
Block a user