Skip to content

Commit

Permalink
Merge pull request #860 from JeromeMartinez/HighDPI_Win7_fix
Browse files Browse the repository at this point in the history
Windows GUI: Use older API for getting system DPI, update
  • Loading branch information
JeromeMartinez authored May 31, 2024
2 parents 38aa66c + c2351df commit 80dc38b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/GUI/VCL/GUI_Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<float>(DPI)/96;
Expand Down

0 comments on commit 80dc38b

Please sign in to comment.