diff --git a/libs/app/source/app.cpp b/libs/app/source/app.cpp index 8d052c00..48c028ea 100644 --- a/libs/app/source/app.cpp +++ b/libs/app/source/app.cpp @@ -189,6 +189,10 @@ namespace psemek::app impl().running = true; while (running()) { + scene * handler = this; + if (impl().current_scene) + handler = impl().current_scene; + poll_events(); if (!impl().had_initial_resize) { @@ -198,8 +202,8 @@ namespace psemek::app on_resize(w, h); } if (!running()) break; - update(); - draw(); + handler->update(); + handler->draw(); SDL_GL_SwapWindow(impl().window); }