From a60281e225785474b6aace67e5c62d1a7b01458b Mon Sep 17 00:00:00 2001 From: Jerome Martinez Date: Fri, 31 May 2024 17:21:44 +0200 Subject: [PATCH] Windows GUI: Use older API for getting system DPI, update --- Source/GUI/VCL/GUI_Main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/GUI/VCL/GUI_Main.cpp b/Source/GUI/VCL/GUI_Main.cpp index 972482f0e..aab262a1a 100644 --- a/Source/GUI/VCL/GUI_Main.cpp +++ b/Source/GUI/VCL/GUI_Main.cpp @@ -249,8 +249,8 @@ void __fastcall TMainF::GUI_Configure() GetVersionEx(&osvi); int DPI; if (osvi.dwMajorVersion >= 10 && (osvi.dwMajorVersion > 10 || osvi.dwMinorVersion > 0 || osvi.dwBuildNumber >= 17134)) - DPI=GetSystemDpiForProcess(GetCurrentProcess()); - else + DPI=GetDeviceCaps(GetDC(NULL), LOGPIXELSX); // GetSystemDpiForProcess(GetCurrentProcess()); + else DPI=GetDeviceCaps(GetDC(NULL), LOGPIXELSX); float DPIScale=static_cast(DPI)/96; float ScaledScreenWidth=Screen->Width/DPIScale;