summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 358974707..459f66052 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -281,7 +281,7 @@ void Viewport::_followMouse()
{
uint8_t button = SDL_GetMouseState(&mMouseX, &mMouseY);
// If the left button is dragged
- if (mPlayerFollowMouse && button & SDL_BUTTON(1))
+ if (mPlayerFollowMouse && (button & SDL_BUTTON(1)))
{
// We create a mouse event and send it to mouseDragged.
uint8_t *keys = SDL_GetKeyState(nullptr);