mirror of
https://github.com/okalachev/flix.git
synced 2025-08-17 00:56:11 +00:00
dt can be negative on simulator reset
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user