Renderer: Scale all imgui fonts by the backbuffer scale

This commit is contained in:
Stenzek 2019-01-19 00:35:33 +10:00
parent c9c0b85056
commit f1e7fb505b
1 changed files with 4 additions and 0 deletions

View File

@ -661,6 +661,10 @@ bool Renderer::InitializeImGui()
// Don't create an ini file. TODO: Do we want this in the future? // Don't create an ini file. TODO: Do we want this in the future?
ImGui::GetIO().IniFilename = nullptr; ImGui::GetIO().IniFilename = nullptr;
ImGui::GetIO().DisplayFramebufferScale.x = m_backbuffer_scale;
ImGui::GetIO().DisplayFramebufferScale.y = m_backbuffer_scale;
ImGui::GetIO().FontGlobalScale = m_backbuffer_scale;
ImGui::GetStyle().ScaleAllSizes(m_backbuffer_scale);
PortableVertexDeclaration vdecl = {}; PortableVertexDeclaration vdecl = {};
vdecl.position = {VAR_FLOAT, 2, offsetof(ImDrawVert, pos), true, false}; vdecl.position = {VAR_FLOAT, 2, offsetof(ImDrawVert, pos), true, false};