summaryrefslogtreecommitdiff
path: root/src/video/sdl_v.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-11-09 16:07:03 +0000
committerrubidium <rubidium@openttd.org>2009-11-09 16:07:03 +0000
commit88a7e238974e8de608ebdb6191e3d34ce25da44e (patch)
treec5f14ce7a2df826bbde3f6aa7924b0fafd404be4 /src/video/sdl_v.cpp
parentcbf4b80b86a3fec2e8021e618fd828e9953c464b (diff)
downloadopenttd-88a7e238974e8de608ebdb6191e3d34ce25da44e.tar.xz
(svn r18031) -Codechange: since basically r7157 adding up 'all' mouse movement isn't needed anymore because after each even that movement is handled and the counter is reset. As such simply assigning instead of adding works.
Diffstat (limited to 'src/video/sdl_v.cpp')
-rw-r--r--src/video/sdl_v.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp
index 984556237..0e347645e 100644
--- a/src/video/sdl_v.cpp
+++ b/src/video/sdl_v.cpp
@@ -385,8 +385,8 @@ static int PollEvent()
int dx = ev.motion.x - _screen.width / 2;
int dy = ev.motion.y - _screen.height / 2;
if (dx != 0 || dy != 0) {
- _cursor.delta.x += dx;
- _cursor.delta.y += dy;
+ _cursor.delta.x = dx;
+ _cursor.delta.y = dy;
SDL_CALL SDL_WarpMouse(_screen.width / 2, _screen.height / 2);
}
} else {