closed #3509: Skip one frame when _deltaTime equal to zero.

This commit is contained in:
boyu0 2014-04-02 14:05:07 +08:00
parent ed29ce8585
commit 31be60fea7
1 changed files with 8 additions and 2 deletions

View File

@ -255,6 +255,12 @@ void Director::drawScene()
{ {
// calculate "global" dt // calculate "global" dt
calculateDeltaTime(); calculateDeltaTime();
// skip one flame when _deltaTime equal to zero.
if(_deltaTime < FLT_EPSILON)
{
return;
}
if (_openGLView) if (_openGLView)
{ {
@ -422,9 +428,9 @@ void Director::setViewport()
} }
} }
void Director::setNextDeltaTimeZero(bool bNextDeltaTimeZero) void Director::setNextDeltaTimeZero(bool nextDeltaTimeZero)
{ {
_nextDeltaTimeZero = bNextDeltaTimeZero; _nextDeltaTimeZero = nextDeltaTimeZero;
} }
void Director::setProjection(Projection projection) void Director::setProjection(Projection projection)