mirror of
https://github.com/glfw/glfw.git
synced 2026-09-20 08:23:13 +00:00
Win32: Add support for Per-Monitor V2 awareness
This adds basic support for the Per-Monitor V2 level of DPI awareness in Windows 10, which allows for automatic DPI scaling of window decorations. This commit does not include resizing the window content area to match the new window content scale. Related to #1115. Fixes #1294.
This commit is contained in:
+2
-2
@@ -324,9 +324,9 @@ void _glfwGetMonitorContentScaleWin32(HMONITOR handle, float* xscale, float* ysc
|
||||
}
|
||||
|
||||
if (xscale)
|
||||
*xscale = xdpi / 96.f;
|
||||
*xscale = xdpi / (float) USER_DEFAULT_SCREEN_DPI;
|
||||
if (yscale)
|
||||
*yscale = ydpi / 96.f;
|
||||
*yscale = ydpi / (float) USER_DEFAULT_SCREEN_DPI;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user