Viewports: fallback DpiScale pulled from fallback Monitor for consistency.
Amend a4ebe3d5, 95c4111. (#8385, #8401, #8393)
This commit is contained in:
parent
0a222a3e2a
commit
e33069ce56
@ -16220,10 +16220,7 @@ ImGuiViewportP* ImGui::AddUpdateViewport(ImGuiWindow* window, ImGuiID id, const
|
||||
|
||||
// Store initial DpiScale before the OS platform window creation, based on expected monitor data.
|
||||
// This is so we can select an appropriate font size on the first frame of our window lifetime
|
||||
if (viewport->PlatformMonitor != -1)
|
||||
viewport->DpiScale = g.PlatformIO.Monitors[viewport->PlatformMonitor].DpiScale;
|
||||
else
|
||||
viewport->DpiScale = 1.0f;
|
||||
viewport->DpiScale = GetViewportPlatformMonitor(viewport)->DpiScale;
|
||||
}
|
||||
|
||||
viewport->Window = window;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user