Skip to content

Commit

Permalink
Handle ImGui framebuffer scale on Emscripten (close #207)
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve J. Cai authored and TheMostDiligent committed Jan 10, 2024
1 parent 1b75576 commit 1351f44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Imgui/src/ImGuiImplEmscripten.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void ImGuiImplEmscripten::NewFrame(Uint32 RenderSurfaceWidth,
m_LastTimestamp = now;
auto& io = ImGui::GetIO();
io.DeltaTime = static_cast<float>(elapsed_ns.count() / 1e+9);
io.DisplaySize = ImVec2(RenderSurfaceWidth, RenderSurfaceHeight);
io.DisplaySize = ImVec2(RenderSurfaceWidth / io.DisplayFramebufferScale.x, RenderSurfaceHeight / io.DisplayFramebufferScale.y);
ImGuiImplDiligent::NewFrame(RenderSurfaceWidth, RenderSurfaceHeight, SurfacePreTransform);
}

Expand Down

0 comments on commit 1351f44

Please sign in to comment.