From d678aab9418e184808022d9c3213b7f33e02ecb2 Mon Sep 17 00:00:00 2001 From: Pascal Thomet Date: Fri, 12 Apr 2024 20:55:11 +0200 Subject: [PATCH] abrunner: simple fix --- src/hello_imgui/internal/backend_impls/abstract_runner.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hello_imgui/internal/backend_impls/abstract_runner.cpp b/src/hello_imgui/internal/backend_impls/abstract_runner.cpp index 9573039d..16b4fcf0 100644 --- a/src/hello_imgui/internal/backend_impls/abstract_runner.cpp +++ b/src/hello_imgui/internal/backend_impls/abstract_runner.cpp @@ -1257,10 +1257,9 @@ void AbstractRunner::CreateFramesAndRender() } #endif - mIdxFrame += 1; - if (_CheckDpiAwareParamsChanges(params)) { + printf("_CheckDpiAwareParamsChanges returned true => reload all fonts\n"); mRenderingBackendCallbacks->Impl_DestroyFontTexture(); _ReloadAllDpiResponsiveFonts(); // cf https://github.com/ocornut/imgui/issues/6547: we need to recreate the rendering backend device objects @@ -1273,6 +1272,8 @@ void AbstractRunner::CreateFramesAndRender() } #endif } + + mIdxFrame += 1; } // Idling for non emscripten, where HelloImGui is responsible for the main loop.