Skip to content

Commit

Permalink
if defined(HELLOIMGUI_MACOS) || defined(HELLOIMGUI_IOS): set fontSize…
Browse files Browse the repository at this point in the history
…IncreaseFactor
  • Loading branch information
pthom committed Nov 21, 2024
1 parent 2ecddcf commit d8c28da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions hello_imgui_cmake/hello_imgui_build_lib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/hello_imgui/internal/backend_impls/abstract_runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d8c28da

Please sign in to comment.