diff --git a/src/hello_imgui/internal/backend_impls/abstract_runner.cpp b/src/hello_imgui/internal/backend_impls/abstract_runner.cpp index 95e6de4f..2d19d8ea 100644 --- a/src/hello_imgui/internal/backend_impls/abstract_runner.cpp +++ b/src/hello_imgui/internal/backend_impls/abstract_runner.cpp @@ -373,11 +373,6 @@ void AbstractRunner::Setup() if (params.callbacks.PostInit) params.callbacks.PostInit(); -#ifdef HELLOIMGUI_WITH_TEST_ENGINE - if (params.useImGuiTestEngine && params.callbacks.RegisterTests) - params.callbacks.RegisterTests(); -#endif - Impl_SetupPlatformRendererBindings(); // @@ -464,6 +459,14 @@ void AbstractRunner::CreateFramesAndRender() { LayoutSettings_HandleChanges(); + #ifdef HELLOIMGUI_WITH_TEST_ENGINE + if (mIdxFrame == 1) + { + if (params.useImGuiTestEngine && params.callbacks.RegisterTests) + params.callbacks.RegisterTests(); + } + #endif + // Note about the application window initial placement and sizing // i/ On the first frame (mIdxFrame==0), we create a window, and use the user provided size (if provided). The window is initially hidden. // (this was done much sooner by mBackendWindowHelper)