| 51 | } |
| 52 | extern int allocatedRamPages; |
| 53 | void mainloop() { |
| 54 | isMainThread = true; |
| 55 | U32 t = KSystem::getMilliesSinceStart(); |
| 56 | U32 nextTimer = getNextTimer(); |
| 57 | if (nextTimer == 0) { |
| 58 | runTimers(); |
| 59 | } |
| 60 | |
| 61 | if (lastTitleUpdate + 5000 < t) { |
| 62 | lastTitleUpdate = t; |
| 63 | BString title; |
| 64 | if (KSystem::title.length()) { |
| 65 | title = KSystem::title; |
| 66 | } else { |
| 67 | title = B("BoxedWine " BOXEDWINE_VERSION_DISPLAY); |
| 68 | } |
| 69 | |
| 70 | title.append(" "); |
| 71 | title.append(getSize(allocatedRamPages)); |
| 72 | emscripten_set_window_title(title.c_str()); |
| 73 | } |
| 74 | if (!KNativeSystem::getCurrentInput()->processEvents()) { |
| 75 | KNativeSystem::cleanup(); |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | void waitForProcessToFinish(const std::shared_ptr<KProcess>& process, KThread* thread) { |
| 80 | BOXEDWINE_CRITICAL_SECTION_WITH_CONDITION(KSystem::processesCond); |
nothing calls this directly
no test coverage detected