| 457 | } |
| 458 | |
| 459 | void MainApplication::ProcessStep() |
| 460 | { |
| 461 | if (appCfg_.withGraphics) { |
| 462 | #if defined(WITH_GLFW) || defined(WITH_SDL) |
| 463 | ProcessEvents(); |
| 464 | #elif defined(WITH_QT5GAMEPAD) |
| 465 | static_cast<Qt5InputManager&>(*inputManager_).updateJoystickStates(); |
| 466 | #endif |
| 467 | } |
| 468 | |
| 469 | const bool suspended = ShouldSuspend(); |
| 470 | if (wasSuspended_ != suspended) { |
| 471 | if (suspended) { |
| 472 | Suspend(); |
| 473 | } else { |
| 474 | Resume(); |
| 475 | } |
| 476 | wasSuspended_ = suspended; |
| 477 | } |
| 478 | |
| 479 | if (!suspended) { |
| 480 | Step(); |
| 481 | } |
| 482 | } |
| 483 | |
| 484 | #if defined(WITH_SDL) |
| 485 | void MainApplication::ProcessEvents() |
no test coverage detected