mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-22 04:24:44 +00:00
imgui: scale font with display dpi
This commit is contained in:
parent
eee01f5857
commit
5c9a73358e
1 changed files with 4 additions and 0 deletions
|
@ -111,6 +111,10 @@ void Initialize(const ::Vulkan::Instance& instance, const Frontend::WindowSDL& w
|
|||
char label[32];
|
||||
ImFormatString(label, IM_ARRAYSIZE(label), "WindowOverViewport_%08X", GetMainViewport()->ID);
|
||||
dock_id = ImHashStr(label);
|
||||
|
||||
if (const auto dpi = SDL_GetWindowDisplayScale(window.GetSdlWindow()); dpi > 0.0f) {
|
||||
GetIO().FontGlobalScale = dpi;
|
||||
}
|
||||
}
|
||||
|
||||
void OnResize() {
|
||||
|
|
Loading…
Add table
Reference in a new issue