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..05ca8538 100644 --- a/src/hello_imgui/internal/backend_impls/abstract_runner.cpp +++ b/src/hello_imgui/internal/backend_impls/abstract_runner.cpp @@ -362,7 +362,7 @@ float _DefaultOsFontRenderingScale() fontSizeIncreaseFactor = windowDevicePixelRatio; #endif - #ifdef HELLOIMGUI_MACOS + #if defined(HELLOIMGUI_MACOS) || defined(HELLOIMGUI_IOS) // Crisp fonts on macOS: // cf https://github.com/ocornut/imgui/issues/5301 // Issue with macOS is that it pretends screen has 2x fewer pixels than it actually does.