| 53 | } |
| 54 | |
| 55 | bool HighFramerateSynchronizer::Synced() |
| 56 | { |
| 57 | #if _DEBUG |
| 58 | if (_controlDelay >= DEBUG_SKIP_FRAME_TIME) |
| 59 | { |
| 60 | TENLog("Game loop is running too slow.", LogLevel::Warning); |
| 61 | App.ResetClock = true; |
| 62 | return false; |
| 63 | } |
| 64 | #endif |
| 65 | |
| 66 | // If frameskip is in action, lock flag will remain set until synchronizer is |
| 67 | // about to break out from it. This flag is later reused in input polling to |
| 68 | // prevent engine from de-registering input events prematurely. |
| 69 | |
| 70 | if (_controlDelay > CONTROL_FRAME_TIME && _controlDelay <= CONTROL_FRAME_TIME * 2) |
| 71 | _locked = false; |
| 72 | |
| 73 | return (_controlDelay >= CONTROL_FRAME_TIME); |
| 74 | } |
| 75 | |
| 76 | void HighFramerateSynchronizer::Step() |
| 77 | { |
no test coverage detected