And reversed the ratios.

This commit is contained in:
OBattler
2023-08-12 18:07:14 +02:00
parent 15b1262d9f
commit 64fed5871a

View File

@@ -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;