1
0
Fork 0

fix wrong computation of delta-t in jpg-httpd

this lead to a screenshot taken on each frame instead of
the defined interval
This commit is contained in:
Torsten Dreyer 2014-03-29 11:22:34 +01:00
parent 4be1aba62e
commit 390f6dd32d

View file

@ -267,7 +267,7 @@ public:
void WindowCaptureCallback::ContextData::readPixels()
{
osg::Timer_t n = osg::Timer::instance()->tick();
double dt = osg::Timer::instance()->delta_s(n, _previousFrameTick);
double dt = osg::Timer::instance()->delta_s(_previousFrameTick,n);
double frameInterval = 1.0 / _httpd->getFrameHz();
if (dt < frameInterval)
return;