Add glfwSetWindowContentScaleCallback

Related to #677.
Related to #1115.
This commit is contained in:
Camilla Löwy
2017-12-11 21:26:40 +01:00
parent 1034b6e0db
commit 370eac3c48
10 changed files with 120 additions and 3 deletions
+8
View File
@@ -996,6 +996,14 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
return 0;
}
case WM_DPICHANGED:
{
const float xscale = HIWORD(wParam) / 96.f;
const float yscale = LOWORD(wParam) / 96.f;
_glfwInputWindowContentScale(window, xscale, yscale);
break;
}
case WM_SETCURSOR:
{
if (LOWORD(lParam) == HTCLIENT)