Skip to content

Commit a6530a5

Browse files
AIGRIND-LLCminggo
authored andcommitted
Correct last delta time (cocos2d#18898)
If next delta time was zeroed (via setNextDeltaTimeZero) the last update time was not corrected.
1 parent 6a52b3f commit a6530a5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cocos/base/CCDirector.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ void Director::calculateDeltaTime()
376376
{
377377
_deltaTime = 0;
378378
_nextDeltaTimeZero = false;
379+
_lastUpdate = std::chrono::steady_clock::now();
379380
}
380381
else
381382
{

0 commit comments

Comments
 (0)