mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-24 00:02:43 +02:00
cleaned up MouseGetScaledDelta and AbsScaledDelta
To prepare for the revised MouseScaledDelta: the current setup has been simplified for easier code reading
This commit is contained in:
1 parent
094d80a5cf
commit
57eead9078
1 file changed
+4
-4
+4
-4
@@ -1244,8 +1244,8 @@ void inputMouseGetScaledDelta(f32* dx, f32* dy)
|
||||
f32 mdx = 0.f, mdy = 0.f;
|
||||
|
||||
if (mouseLocked) {
|
||||
mdx = mouseSensX * ((f32)mouseDX / 3.5f) * 0.022f;
|
||||
mdy = mouseSensY * ((f32)mouseDY / 3.5f) * 0.022f;
|
||||
mdx = mouseDX * (0.022f / 3.5f) * mouseSensX;
|
||||
mdy = mouseDY * (0.022f / 3.5f) * mouseSensY;
|
||||
}
|
||||
if (dx) *dx = mdx;
|
||||
if (dy) *dy = mdy;
|
||||
@@ -1256,8 +1256,8 @@ void inputMouseGetAbsScaledDelta(f32* dx, f32* dy)
|
||||
f32 mdx = 0.f, mdy = 0.f;
|
||||
|
||||
if (mouseLocked) {
|
||||
mdx = fabsf(mouseSensX) * ((f32)mouseDX / 3.5f) * 0.022f;
|
||||
mdy = fabsf(mouseSensY) * ((f32)mouseDY / 3.5f) * 0.022f;
|
||||
mdx = fabsf(mouseDX) * (0.022f / 3.5f) * fabsf(mouseSensX);
|
||||
mdy = fabsf(mouseDY) * (0.022f / 3.5f) * fabsf(mouseSensY);
|
||||
}
|
||||
if (dx) *dx = mdx;
|
||||
if (dy) *dy = mdy;
|
||||
|
||||
Reference in new issue
Block a user