From a7f259352cf5f6965fbbf64b241005618a06dc32 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Wed, 3 Mar 2021 16:17:50 +0300 Subject: [PATCH] App sends on_scene_exit at the end of main loop --- libs/app/source/app.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/app/source/app.cpp b/libs/app/source/app.cpp index 18af5768..f1cc61b5 100644 --- a/libs/app/source/app.cpp +++ b/libs/app/source/app.cpp @@ -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)