Skip to content

Commit

Permalink
Windows GUI: Use older API for getting system DPI, update
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeMartinez committed May 31, 2024
1 parent 38aa66c commit a60281e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/GUI/VCL/GUI_Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<float>(DPI)/96;
float ScaledScreenWidth=Screen->Width/DPIScale;
Expand Down

0 comments on commit a60281e

Please sign in to comment.