App sends on_scene_exit at the end of main loop

This commit is contained in:
Nikita Lisitsa 2021-03-03 16:17:50 +03:00
parent 31fbfdaa4d
commit a7f259352c

View file

@ -200,7 +200,7 @@ namespace psemek::app
SDL_ShowWindow(impl().window);
impl().running = true;
if (impl().current_scene == nullptr)
impl().get_scene()->on_scene_enter();
on_scene_enter();
while (running())
{
poll_events();
@ -220,6 +220,7 @@ namespace psemek::app
SDL_GL_SwapWindow(impl().window);
}
impl().get_scene()->on_scene_exit();
}
scene * app::set_scene(scene * s)