Separate X and Y dpi_scale

This commit is contained in:
Henrik Rydgård committed 2017-08-07 13:37:01 +02:00
1 parent 11c75476f7
commit f4cf501cf6
16 files changed
+128 -105

No files matched your search

+6 -6
View File
@@ -574,8 +574,8 @@ namespace MainWindow
// Hack: Take the opportunity to show the cursor.
mouseButtonDown = true;
float x = GET_X_LPARAM(lParam) * g_dpi_scale;
float y = GET_Y_LPARAM(lParam) * g_dpi_scale;
float x = GET_X_LPARAM(lParam) * g_dpi_scale_x;
float y = GET_Y_LPARAM(lParam) * g_dpi_scale_y;
WindowsRawInput::SetMousePos(x, y);
TouchInput touch;
@@ -615,8 +615,8 @@ namespace MainWindow
prevCursorX = cursorX;
prevCursorY = cursorY;
float x = GET_X_LPARAM(lParam) * g_dpi_scale;
float y = GET_Y_LPARAM(lParam) * g_dpi_scale;
float x = (float)cursorX * g_dpi_scale_x;
float y = (float)cursorY * g_dpi_scale_y;
WindowsRawInput::SetMousePos(x, y);
if (wParam & MK_LBUTTON) {
@@ -637,8 +637,8 @@ namespace MainWindow
// Hack: Take the opportunity to hide the cursor.
mouseButtonDown = false;
float x = GET_X_LPARAM(lParam) * g_dpi_scale;
float y = GET_Y_LPARAM(lParam) * g_dpi_scale;
float x = (float)GET_X_LPARAM(lParam) * g_dpi_scale_x;
float y = (float)GET_Y_LPARAM(lParam) * g_dpi_scale_y;
WindowsRawInput::SetMousePos(x, y);
TouchInput touch;