lua: core.open_world

This commit is contained in:
MihailRis
2024-03-20 23:55:04 +03:00
parent 0140fb8e3e
commit 567c8a365f
3 changed files with 31 additions and 6 deletions
+10
View File
@@ -165,6 +165,12 @@ void Engine::mainloop() {
} else {
Window::swapInterval(1);
}
while (!postRunnables.empty()) {
postRunnables.front()();
postRunnables.pop();
}
Window::swapBuffers();
Events::pollEvents();
}
@@ -311,3 +317,7 @@ ResPaths* Engine::getResPaths() {
std::shared_ptr<Screen> Engine::getScreen() {
return screen;
}
void Engine::postRunnable(runnable callback) {
postRunnables.push(callback);
}