| 991 | } |
| 992 | |
| 993 | void Application::updateDeltaTime() { |
| 994 | double currentTime = getCurrentTime(); |
| 995 | _deltaTime = currentTime - _lastTime; |
| 996 | // in case of system timer api error |
| 997 | if (_deltaTime <= 0) { |
| 998 | _deltaTime = 1.0 / _targetFPS; |
| 999 | _lastTime = currentTime; |
| 1000 | } |
| 1001 | } |
| 1002 | |
| 1003 | #if BX_PLATFORM_ANDROID || BX_PLATFORM_OSX || BX_PLATFORM_WINDOWS || BX_PLATFORM_LINUX |
| 1004 | void Application::updateWindowSize() { |