diff --git a/src/hello_imgui/internal/backend_impls/abstract_runner.cpp b/src/hello_imgui/internal/backend_impls/abstract_runner.cpp index 46ccfdc2..52477df9 100644 --- a/src/hello_imgui/internal/backend_impls/abstract_runner.cpp +++ b/src/hello_imgui/internal/backend_impls/abstract_runner.cpp @@ -535,7 +535,7 @@ void AbstractRunner::InitImGuiContext() #endif } -void AbstractRunner::SetImGuiPrefs() +void AbstractRunner::CheckPrefs() { if (params.imGuiWindowParams.enableViewports) { @@ -549,6 +549,14 @@ void AbstractRunner::SetImGuiPrefs() #else ImGui::GetIO().IniFilename = ""; #endif + +#ifndef IMGUI_BUNDLE_WITH_TEST_ENGINE + if (params.useImGuiTestEngine) + { + fprintf(stderr, "HelloImGui: RunnerParam.useImGuiTestEngine is true, but HelloImGui was not built with support for ImGui Test Engine. Disabling!\n"); + params.useImGuiTestEngine = false; + } +#endif } @@ -684,7 +692,7 @@ void AbstractRunner::Setup() InitRenderBackendCallbacks(); InitImGuiContext(); - SetImGuiPrefs(); + CheckPrefs(); // Init platform backend (SDL, Glfw) Impl_InitPlatformBackend(); diff --git a/src/hello_imgui/internal/backend_impls/abstract_runner.h b/src/hello_imgui/internal/backend_impls/abstract_runner.h index 97135657..653eb0f4 100644 --- a/src/hello_imgui/internal/backend_impls/abstract_runner.h +++ b/src/hello_imgui/internal/backend_impls/abstract_runner.h @@ -85,7 +85,7 @@ class AbstractRunner private: void RenderGui(); void InitImGuiContext(); - void SetImGuiPrefs(); + void CheckPrefs(); void InitRenderBackendCallbacks(); void SetupDpiAwareParams();