From ceab8c2ee64d208fb23836175df2947151b0382b Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Mon, 18 Dec 2017 15:33:50 +0100 Subject: [PATCH] call resize on state enter to init size --- src/app/app.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/app.cpp b/src/app/app.cpp index 950eda8..8cd49f3 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -39,6 +39,7 @@ void Application::PushState(State *s) { ++s->ref_count; if (s->ref_count == 1) { s->OnEnter(); + s->OnResize(viewport.Width(), viewport.Height()); } s->OnResume(); } @@ -66,6 +67,7 @@ State *Application::SwitchState(State *s_new) { } if (s_new->ref_count == 1) { s_new->OnEnter(); + s_new->OnResize(viewport.Width(), viewport.Height()); } s_new->OnResume(); return s_old; -- 2.39.2