X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Flayout.cpp;h=70a9f106849d26ec2f9b59ad0eb2d5b8d13a2169;hb=1709c7afe41a96b079f3d34c9625d1a790dcc805;hp=fe21881a2e4ab46a5f7f1e3b6a6e48c75bf7c2af;hpb=08dea8dfcf923e9296bcd3910455540895d0439b;p=r2c2.git diff --git a/source/libr2c2/layout.cpp b/source/libr2c2/layout.cpp index fe21881..70a9f10 100644 --- a/source/libr2c2/layout.cpp +++ b/source/libr2c2/layout.cpp @@ -425,6 +425,14 @@ void Layout::tick() dt = t-last_tick; last_tick = t; + unsigned count = dt/(10*Time::msec)+1; + dt /= count; + while(count--) + step(dt); +} + +void Layout::step(const Time::TimeDelta &dt) +{ if(!driver || !driver->is_halted()) clock.tick(dt);