Revert "Get rid of remains of support for non-square screen DPIs"

This reverts commit f206ed95eb.
This commit is contained in:
Henrik Rydgård committed 2025-05-21 21:41:50 +02:00
1 parent 53f8c32309
commit 09e067c6e1
31 files changed
+151 -132

No files matched your search

+10 -10
View File
@@ -668,8 +668,8 @@ namespace MainWindow
// Hack: Take the opportunity to show the cursor.
mouseButtonDown = true;
float x = GET_X_LPARAM(lParam) * g_display.dpi_scale;
float y = GET_Y_LPARAM(lParam) * g_display.dpi_scale;
float x = GET_X_LPARAM(lParam) * g_display.dpi_scale_x;
float y = GET_Y_LPARAM(lParam) * g_display.dpi_scale_y;
WindowsRawInput::SetMousePos(x, y);
TouchInput touch{};
@@ -716,8 +716,8 @@ namespace MainWindow
prevCursorX = cursorX;
prevCursorY = cursorY;
float x = (float)cursorX * g_display.dpi_scale;
float y = (float)cursorY * g_display.dpi_scale;
float x = (float)cursorX * g_display.dpi_scale_x;
float y = (float)cursorY * g_display.dpi_scale_y;
WindowsRawInput::SetMousePos(x, y);
// Mouse moves now happen also when no button is pressed.
@@ -742,8 +742,8 @@ namespace MainWindow
// Hack: Take the opportunity to hide the cursor.
mouseButtonDown = false;
float x = (float)GET_X_LPARAM(lParam) * g_display.dpi_scale;
float y = (float)GET_Y_LPARAM(lParam) * g_display.dpi_scale;
float x = (float)GET_X_LPARAM(lParam) * g_display.dpi_scale_x;
float y = (float)GET_Y_LPARAM(lParam) * g_display.dpi_scale_y;
WindowsRawInput::SetMousePos(x, y);
TouchInput touch{};
@@ -762,8 +762,8 @@ namespace MainWindow
case WM_RBUTTONDOWN:
{
float x = GET_X_LPARAM(lParam) * g_display.dpi_scale;
float y = GET_Y_LPARAM(lParam) * g_display.dpi_scale;
float x = GET_X_LPARAM(lParam) * g_display.dpi_scale_x;
float y = GET_Y_LPARAM(lParam) * g_display.dpi_scale_y;
TouchInput touch{};
touch.buttons = 2;
@@ -776,8 +776,8 @@ namespace MainWindow
case WM_RBUTTONUP:
{
float x = GET_X_LPARAM(lParam) * g_display.dpi_scale;
float y = GET_Y_LPARAM(lParam) * g_display.dpi_scale;
float x = GET_X_LPARAM(lParam) * g_display.dpi_scale_x;
float y = GET_Y_LPARAM(lParam) * g_display.dpi_scale_y;
TouchInput touch{};
touch.buttons = 2;