summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-02-03 12:59:16 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-02-03 12:59:16 -0500
commitc54dd4fd583f1d00d424590a9f192b2a35ede26b (patch)
treed142b2bd186183a821ea707142a3dd844769e316
parent683e22c419757744ce853c35d732f607ddb9af16 (diff)
downloadtanetane-c54dd4fd583f1d00d424590a9f192b2a35ede26b.tar.gz
tanetane-c54dd4fd583f1d00d424590a9f192b2a35ede26b.tar.bz2
tanetane-c54dd4fd583f1d00d424590a9f192b2a35ede26b.zip
Main loop exit guard
-rw-r--r--src/main.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp index 771aa1c..e5a96e4 100644 --- a/src/main.cpp +++ b/src/main.cpp
@@ -50,7 +50,7 @@ void loop(Renderer& renderer) {
50 50
51 size_t lastTime = SDL_GetTicks(); 51 size_t lastTime = SDL_GetTicks();
52 52
53 for (;;) { 53 while (!game.shouldQuit()) {
54 size_t currentTime = SDL_GetTicks(); 54 size_t currentTime = SDL_GetTicks();
55 size_t frameTime = currentTime - lastTime; 55 size_t frameTime = currentTime - lastTime;
56 lastTime = currentTime; 56 lastTime = currentTime;
@@ -60,10 +60,6 @@ void loop(Renderer& renderer) {
60 } 60 }
61 61
62 renderer.render(game); 62 renderer.render(game);
63
64 if (game.shouldQuit()) {
65 return;
66 }
67 } 63 }
68} 64}
69 65