summaryrefslogtreecommitdiffstats
path: root/src/core/Pad.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-04-29 17:53:05 +0200
committereray orçunus <erayorcunus@gmail.com>2020-04-29 17:53:05 +0200
commitfdb1580e1579e66edf7c8585c70e445f1b65bfe2 (patch)
treea48ec450520c92697c3728dc7a25aac5d649108b /src/core/Pad.cpp
parentfor real this time (diff)
downloadre3-fdb1580e1579e66edf7c8585c70e445f1b65bfe2.tar
re3-fdb1580e1579e66edf7c8585c70e445f1b65bfe2.tar.gz
re3-fdb1580e1579e66edf7c8585c70e445f1b65bfe2.tar.bz2
re3-fdb1580e1579e66edf7c8585c70e445f1b65bfe2.tar.lz
re3-fdb1580e1579e66edf7c8585c70e445f1b65bfe2.tar.xz
re3-fdb1580e1579e66edf7c8585c70e445f1b65bfe2.tar.zst
re3-fdb1580e1579e66edf7c8585c70e445f1b65bfe2.zip
Diffstat (limited to 'src/core/Pad.cpp')
-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