From 64fed5871a3d233aa08f541af3d160423ff4f478 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 12 Aug 2023 18:07:14 +0200 Subject: [PATCH] And reversed the ratios. --- src/device/mouse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/device/mouse.c b/src/device/mouse.c index ae68353fc..0f994ff27 100644 --- a/src/device/mouse.c +++ b/src/device/mouse.c @@ -171,8 +171,8 @@ mouse_scale_coord_x(double x, int mul) double ratio = 1.0; if (!mouse_raw) - ratio = (monitors[0].mon_res_x * plat_get_dpi())/ - ((double) monitors[0].mon_unscaled_size_x); + ratio = ((double) monitors[0].mon_unscaled_size_x) / + (monitors[0].mon_res_x * plat_get_dpi()); if (mul) x *= ratio; @@ -188,8 +188,8 @@ mouse_scale_coord_y(double y, int mul) double ratio = 1.0; if (!mouse_raw) - ratio = (monitors[0].mon_res_y * plat_get_dpi()) / - ((double) monitors[0].mon_efscrnsz_y); + ratio = ((double) monitors[0].mon_efscrnsz_y) / + (monitors[0].mon_res_y * plat_get_dpi()); if (mul) y *= ratio;