You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO: Consider using GetDpiForWindow (Windows 10, version 1607+) as a fallback, which can be more accurate in multi-monitor setups with different DPI settings.
341
+
// TODO: Consider a fallback to GetDeviceCaps(LOGPIXELSX/Y) via a DC if GetDpiForMonitor is not available, which is the traditional way to get DPI on older Windows versions.
342
+
HResult result = Win32.GetDpiForMonitor(hMonitor,Win32.MDT_EFFECTIVE_DPI,&x,&y);
343
+
344
+
if(result.IsSuccess)
345
+
{
346
+
dpiX=(int)x;
347
+
dpiY =(int)y;
348
+
}
349
+
else
350
+
{
351
+
// Defaults to 96 dpi, which corresponds to 100% scaling
0 commit comments