summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-04-29 20:56:25 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-04-29 20:56:25 +0200
commit38655693f52e36bcb87e25d0bcd659e69ad41729 (patch)
tree238933547482b35921a2bb21a3b6438dc8bdfc93 /src/core
parentMerge remote-tracking branch 'upstream/master' (diff)
parentMouse wheel fix (diff)
downloadre3-38655693f52e36bcb87e25d0bcd659e69ad41729.tar
re3-38655693f52e36bcb87e25d0bcd659e69ad41729.tar.gz
re3-38655693f52e36bcb87e25d0bcd659e69ad41729.tar.bz2
re3-38655693f52e36bcb87e25d0bcd659e69ad41729.tar.lz
re3-38655693f52e36bcb87e25d0bcd659e69ad41729.tar.xz
re3-38655693f52e36bcb87e25d0bcd659e69ad41729.tar.zst
re3-38655693f52e36bcb87e25d0bcd659e69ad41729.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Pad.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp
index 0a626570..a72f51c0 100644
--- a/src/core/Pad.cpp
+++ b/src/core/Pad.cpp
@@ -575,14 +575,15 @@ void CPad::UpdateMouse()
PCTempMouseControllerState.MXB1 = glfwGetMouseButton(PSGLOBAL(window), GLFW_MOUSE_BUTTON_4);
PCTempMouseControllerState.MXB2 = glfwGetMouseButton(PSGLOBAL(window), GLFW_MOUSE_BUTTON_5);
- PSGLOBAL(lastMousePos.x) = xpos;
- PSGLOBAL(lastMousePos.y) = ypos;
-
if (PSGLOBAL(mouseWheel) > 0)
PCTempMouseControllerState.WHEELUP = 1;
else if (PSGLOBAL(mouseWheel) < 0)
PCTempMouseControllerState.WHEELDN = 1;
+ PSGLOBAL(lastMousePos.x) = xpos;
+ PSGLOBAL(lastMousePos.y) = ypos;
+ PSGLOBAL(mouseWheel) = 0.0f;
+
OldMouseControllerState = NewMouseControllerState;
NewMouseControllerState = PCTempMouseControllerState;
#endif