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