From c2351df9911a83ee880a2c8b3cf2a0d2e5997428 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/GUI/VCL/GUI_Main.cpp b/Source/GUI/VCL/GUI_Main.cpp index 972482f0e..1e5ad840e 100644 --- a/Source/GUI/VCL/GUI_Main.cpp +++ b/Source/GUI/VCL/GUI_Main.cpp @@ -249,7 +249,7 @@ 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()); + DPI=GetDeviceCaps(GetDC(NULL), LOGPIXELSX); // GetSystemDpiForProcess(GetCurrentProcess()); else DPI=GetDeviceCaps(GetDC(NULL), LOGPIXELSX); float DPIScale=static_cast(DPI)/96;