summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 07ac831..d221f50 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -39,6 +39,8 @@ int main() {
while (pkeSettings.isGameRunning) {
+ glfwPollEvents();
+
if (nsAhead > 0) {
std::this_thread::sleep_until(lastTimePoint + GameTimeDuration(nsAhead + 1));
nsAhead = 0;
@@ -79,8 +81,11 @@ int main() {
tickCount = 0;
}
+ pkeSettings.isGameRunning = !glfwWindowShouldClose(window);
}
+ vkDeviceWaitIdle(vkDevice);
+
} catch (const std::exception &exc) {
printf("EXCEPTION: %s\n", exc.what());
} catch (const char *err) {