diff --git a/hello_imgui_cmake/hello_imgui_build_lib.cmake b/hello_imgui_cmake/hello_imgui_build_lib.cmake index 0bc8278f..923da1b5 100644 --- a/hello_imgui_cmake/hello_imgui_build_lib.cmake +++ b/hello_imgui_cmake/hello_imgui_build_lib.cmake @@ -233,6 +233,9 @@ function(him_add_hello_imgui) if(APPLE AND NOT IOS) target_compile_definitions(${HELLOIMGUI_TARGET} PUBLIC HELLOIMGUI_MACOS) endif() + if(APPLE AND IOS) + target_compile_definitions(${HELLOIMGUI_TARGET} PUBLIC HELLOIMGUI_IOS) + endif() if(APPLE) target_compile_options(${HELLOIMGUI_TARGET} PRIVATE "-x" "objective-c++") endif() diff --git a/src/hello_imgui/internal/backend_impls/abstract_runner.cpp b/src/hello_imgui/internal/backend_impls/abstract_runner.cpp index b08085dc..541bae53 100644 --- a/src/hello_imgui/internal/backend_impls/abstract_runner.cpp +++ b/src/hello_imgui/internal/backend_impls/abstract_runner.cpp @@ -370,6 +370,9 @@ float _DefaultOsFontRenderingScale() // while screen renders at 2x scale. fontSizeIncreaseFactor = (float) NSScreen.mainScreen.backingScaleFactor; #endif + #ifdef HELLOIMGUI_IOS + fontSizeIncreaseFactor = 2.0; // Retina + #endif #ifdef HELLOIMGUI_WITH_REMOTE_DISPLAY if (HelloImGui::GetRunnerParams()->remoteParams.enableRemoting)