| 80 | } |
| 81 | |
| 82 | bool mainContinue() |
| 83 | { |
| 84 | if (gApp->isOpen() && !gApp->isCloseRequested()) |
| 85 | { |
| 86 | if(gApp->getInputMutex().trylock()) |
| 87 | { |
| 88 | gApp->handleMouseVisualization(); |
| 89 | gApp->doInput(); |
| 90 | gApp->update(); |
| 91 | #if !SEPARATE_EVENT_LOOP |
| 92 | gApp->updateEngine(); |
| 93 | #endif |
| 94 | gApp->getInputMutex().unlock(); |
| 95 | } |
| 96 | Ps::Thread::yield(); |
| 97 | return true; |
| 98 | } |
| 99 | |
| 100 | #if SEPARATE_EVENT_LOOP |
| 101 | gApp->signalQuit(); |
| 102 | gApp->waitForQuit(); |
| 103 | #else |
| 104 | if (gApp->isOpen() || gApp->isCloseRequested()) |
| 105 | gApp->close(); |
| 106 | #endif |
| 107 | |
| 108 | return false; |
| 109 | } |
| 110 | |
| 111 | void mainLoop() |
| 112 | { |
no test coverage detected