[client] imgui: use improved high DPI rendering

This actually makes imgui render at a higher resolution, avoiding scaling
and resulting blurriness.
This commit is contained in:
Quantum
2021-07-23 00:01:10 -04:00
committed by Geoffrey McRae
parent b5c5ecc074
commit 5d053128ac
11 changed files with 122 additions and 18 deletions

View File

@@ -93,6 +93,8 @@ static int graphs_render(void * udata, bool interactive,
if (!g_state.showTiming)
return 0;
float fontSize = igGetFontSize();
ImVec2 pos = {0.0f, 0.0f};
igSetNextWindowBgAlpha(0.4f);
igSetNextWindowPos(pos, 0, pos);
@@ -121,7 +123,7 @@ static int graphs_render(void * udata, bool interactive,
}
char title[64];
const ImVec2 size = {400.0f, 100.0f};
const ImVec2 size = {28.0f * fontSize, 7.0f * fontSize};
snprintf(title, sizeof(title),
"%s: min:%4.2f max:%4.2f avg:%4.2f/%4.2fHz",