Expose ui scaling and orientation

This commit is contained in:
Georg Hagen
2024-07-27 14:30:59 +02:00
parent 6a1a76f4d1
commit eb81c777bf
7 changed files with 45 additions and 43 deletions

View File

@@ -45,7 +45,7 @@ namespace OpenVulkano
if (w > 0 && h > 0)
io.DisplayFramebufferScale = ImVec2((float)display_w / (float)w, (float)display_h / (float)h);*/
io.DisplaySize = { static_cast<float>(m_window->GetWidth()), static_cast<float>(m_window->GetHeight()) };
io.DisplayFramebufferScale = { 1, 1 };
io.DisplayFramebufferScale = { m_window->GetContentScale(), m_window->GetContentScale() };
//if (bd->WantUpdateMonitors)
//ImGui_ImplGlfw_UpdateMonitors();
@@ -68,4 +68,4 @@ namespace OpenVulkano
io.BackendPlatformUserData = nullptr;
io.BackendFlags = ImGuiBackendFlags_None;
}
}
}