lua: core.open_world
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user