summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index d016c0aa3..dcd4d82ea 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -942,5 +942,9 @@ void Gui::removeDragged(gcn::Widget *widget)
uint32_t Gui::getMouseState(int *const x, int *const y) const
{
- return SDL_GetMouseState(x, y);
+ const uint32_t res = SDL_GetMouseState(x, y);
+ const int scale = mainGraphics->getScale();
+ (*x) /= scale;
+ (*y) /= scale;
+ return res;
}