Skip to content

Commit a60281e

Browse files
Windows GUI: Use older API for getting system DPI, update
1 parent 38aa66c commit a60281e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/GUI/VCL/GUI_Main.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ void __fastcall TMainF::GUI_Configure()
249249
GetVersionEx(&osvi);
250250
int DPI;
251251
if (osvi.dwMajorVersion >= 10 && (osvi.dwMajorVersion > 10 || osvi.dwMinorVersion > 0 || osvi.dwBuildNumber >= 17134))
252-
DPI=GetSystemDpiForProcess(GetCurrentProcess());
253-
else
252+
DPI=GetDeviceCaps(GetDC(NULL), LOGPIXELSX); // GetSystemDpiForProcess(GetCurrentProcess());
253+
else
254254
DPI=GetDeviceCaps(GetDC(NULL), LOGPIXELSX);
255255
float DPIScale=static_cast<float>(DPI)/96;
256256
float ScaledScreenWidth=Screen->Width/DPIScale;

0 commit comments

Comments
 (0)