summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-04-29 20:53:54 +0200
committeraap <aap@papnet.eu>2020-04-29 20:53:54 +0200
commit3580e31ce0dc8e9a2b2c9105267bcd78c68dcf80 (patch)
tree6939684a009632a20c939dca6646e22d383073f7 /src
parentimplemented improved video modes for win.cpp (diff)
parentMouse wheel fix (diff)
downloadre3-3580e31ce0dc8e9a2b2c9105267bcd78c68dcf80.tar
re3-3580e31ce0dc8e9a2b2c9105267bcd78c68dcf80.tar.gz
re3-3580e31ce0dc8e9a2b2c9105267bcd78c68dcf80.tar.bz2
re3-3580e31ce0dc8e9a2b2c9105267bcd78c68dcf80.tar.lz
re3-3580e31ce0dc8e9a2b2c9105267bcd78c68dcf80.tar.xz
re3-3580e31ce0dc8e9a2b2c9105267bcd78c68dcf80.tar.zst
re3-3580e31ce0dc8e9a2b2c9105267bcd78c68dcf80.zip
Diffstat (limited to 'src')
-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