Mouse: Fix the if blocks in mouse_subtract_z().

This commit is contained in:
OBattler
2024-09-03 00:45:40 +02:00
parent 5337fe6c12
commit 16f4ebab9c

View File

@@ -482,10 +482,10 @@ mouse_subtract_z(int *delta_z, int min, int max, int invert)
int z = atomic_load(&mouse_z);
int real_z = invert ? -z : z;
if (mouse_z > max) {
if (real_z > max) {
*delta_z = max;
real_z -= max;
} else if (mouse_z < min) {
} else if (real_z < min) {
*delta_z = min;
real_z += ABS(min);
} else {