diff --git a/Application.cpp b/Application.cpp index b591f2d..8e7457e 100644 --- a/Application.cpp +++ b/Application.cpp @@ -17,12 +17,6 @@ Application Application::app; void Application::run() { bool quit {false}; while (!quit) { - for (const Window& window : Window::windows()) { - window.update(); - } - for (RunLoopAction action : _actions) { - action(); - } SDL_Event event; if (SDL_PollEvent(&event)) { switch (event.type) { @@ -36,6 +30,12 @@ void Application::run() { quit = handle_event(event); } } + for (const Window& window : Window::windows()) { + window.update(); + } + for (RunLoopAction action : _actions) { + action(); + } } }