1
0
mirror of synced 2025-01-18 17:14:13 +01:00

fix: Potentially fix scaling issues on macOS

This commit is contained in:
WerWolv 2023-01-13 20:06:03 +01:00
parent b497e9d867
commit 45492365be

View File

@ -4964,7 +4964,9 @@ static void SetupViewportDrawData(ImGuiViewportP* viewport, ImVector<ImDrawList*
draw_data->TotalVtxCount = draw_data->TotalIdxCount = 0;
draw_data->DisplayPos = viewport->Pos;
draw_data->DisplaySize = is_minimized ? ImVec2(0.0f, 0.0f) : viewport->Size;
draw_data->FramebufferScale = io.DisplayFramebufferScale; // FIXME-VIEWPORT: This may vary on a per-monitor/viewport basis?
// IMHEX PATCH BEGIN
draw_data->FramebufferScale = ImVec2(floor(viewport->DpiScale), floor(viewport->DpiScale)); // FIXME-VIEWPORT: This may vary on a per-monitor/viewport basis?
// IMHEX PATCH END
draw_data->OwnerViewport = viewport;
for (int n = 0; n < draw_lists->Size; n++)
{