diff --git a/libs/app/source/app.cpp b/libs/app/source/app.cpp index 48c028ea..be3eacba 100644 --- a/libs/app/source/app.cpp +++ b/libs/app/source/app.cpp @@ -189,17 +189,18 @@ namespace psemek::app impl().running = true; while (running()) { + poll_events(); + scene * handler = this; if (impl().current_scene) handler = impl().current_scene; - poll_events(); if (!impl().had_initial_resize) { int w, h; SDL_GetWindowSize(impl().window, &w, &h); impl().had_initial_resize = true; - on_resize(w, h); + handler->on_resize(w, h); } if (!running()) break; handler->update();