diff --git a/examples/common/entry/entry.cpp b/examples/common/entry/entry.cpp index 58a671e6a..e5ce4d77c 100644 --- a/examples/common/entry/entry.cpp +++ b/examples/common/entry/entry.cpp @@ -530,11 +530,11 @@ BX_PRAGMA_DIAGNOSTIC_POP(); int runApp(AppI* _app, int _argc, const char* const* _argv) { + setWindowSize(kDefaultWindowHandle, s_width, s_height); + _app->init(_argc, _argv, s_width, s_height); bgfx::frame(); - setWindowSize(kDefaultWindowHandle, s_width, s_height); - #if BX_PLATFORM_EMSCRIPTEN s_app = _app; emscripten_set_main_loop(&updateApp, -1, 1);