UI: Properly size microprofile, make dpi transparent to unaware users.

This commit is contained in:
Dr. Chat
2017-08-03 22:34:12 -05:00
parent 707f4c96ba
commit 5430dd0cd0
5 changed files with 20 additions and 9 deletions

View File

@@ -193,8 +193,8 @@ void Window::OnPaint(UIEvent* e) {
io.DeltaTime = (now_ns - last_paint_time_ns_) / 10000000.0f;
last_paint_time_ns_ = now_ns;
}
io.DisplaySize =
ImVec2(static_cast<float>(width()), static_cast<float>(height()));
io.DisplaySize = ImVec2(static_cast<float>(scaled_width()),
static_cast<float>(scaled_height()));
ImGui::NewFrame();
context_->BeginSwap();