summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-11-09 16:05:24 +0000
committerrubidium <rubidium@openttd.org>2009-11-09 16:05:24 +0000
commitcbf4b80b86a3fec2e8021e618fd828e9953c464b (patch)
treecfaf9c230f443b972a7eeb6281bf2e3a3b947d82 /src/window.cpp
parent85a910f02e6dd835354d11353f27f99e56ff4f1e (diff)
downloadopenttd-cbf4b80b86a3fec2e8021e618fd828e9953c464b.tar.xz
(svn r18030) -Fix: screen jumped a bit for at least SDL and Allegro when right-click-dragging
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/window.cpp b/src/window.cpp
index a336d6585..30ce10192 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -2197,7 +2197,7 @@ static void HandleKeyScrolling()
}
}
-void MouseLoop(MouseClick click, int mousewheel)
+static void MouseLoop(MouseClick click, int mousewheel)
{
DecreaseWindowCounters();
HandlePlacePresize();
@@ -2340,6 +2340,11 @@ void HandleMouseEvents()
}
MouseLoop(click, mousewheel);
+
+ /* We have moved the mouse the required distance,
+ * no need to move it at any later time. */
+ _cursor.delta.x = 0;
+ _cursor.delta.y = 0;
}
/**