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.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 1b5b00c3..0aab399c 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -286,6 +286,10 @@ void Viewport::logic()
void Viewport::_followMouse()
{
Uint8 button = SDL_GetMouseState(&mMouseX, &mMouseY);
+
+ mMouseX /= graphics->getScale();
+ mMouseY /= graphics->getScale();
+
// If the left button is dragged
if (mPlayerFollowMouse && button & SDL_BUTTON(1))
{
@@ -313,6 +317,9 @@ void Viewport::_drawDebugPath(Graphics *graphics)
// Get the current mouse position
SDL_GetMouseState(&mMouseX, &mMouseY);
+ mMouseX /= graphics->getScale();
+ mMouseY /= graphics->getScale();
+
// Prepare the walkmask corresponding to the protocol
unsigned char walkMask;
switch (Net::getNetworkType())