Closed rokups closed 1 month ago
This changed with c11128891. (#6348)
I will work something out. Btw it is likely that in following semester we will head toward making examples on master DPI aware which will probably involve moving some of this into master and adding missing functions (e.g. dpiscale from window/hwnd, dpiscale from monitor).
Pushed the change with 4227250
Version/Branch of Dear ImGui:
Version 1.91, Branch: docking
Back-ends:
imgui_impl_sdl2.cpp
Compiler, OS:
Not applicable
Full config/build information:
No response
Details:
At some point within last year or so behavior of library changed, and now
ImGui_ImplSDL2_UpdateMonitors()
(and respective functions of other backends) are first called duringNewFrame()
. This means monitor information is not available during initial setup. I have a HDPI support patch, which involves baking font atlases for each DPI. This is done each time font is added, which happens during initial setup as well. To fix my patch i had to modify SDL2 backend, to makeImGui_ImplSDL2_UpdateMonitors()
non-static and call it early enough so i can work with monitor information. I probably should fix my patch, however i think it would be useful to have monitor information earlier. MaybeImGui_ImplSDL2_UpdateMonitors
could also be called fromImGui_ImplSDL2_Init*
?Thanks for considering it
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
No response