summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-10-25 17:01:45 +0000
committersmatz <smatz@openttd.org>2009-10-25 17:01:45 +0000
commita558159faa10e66f27246f9fcd2defc717b05567 (patch)
treef8844ed23c18dc186fd3350bb39f26dd82cf2f1c /src
parent4dd587345d1308aadc390c0be5e50fd072b9e55f (diff)
downloadopenttd-a558159faa10e66f27246f9fcd2defc717b05567.tar.xz
(svn r17869) -Codechange: don't create OnScroll() event for zero delta
Diffstat (limited to 'src')
-rw-r--r--src/window.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/window.cpp b/src/window.cpp
index fc8e605eb..3ba3866e4 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -1960,7 +1960,7 @@ static bool HandleViewportScroll()
}
/* Create a scroll-event and send it to the window */
- w->OnScroll(delta);
+ if (delta.x != 0 || delta.y != 0) w->OnScroll(delta);
_cursor.delta.x = 0;
_cursor.delta.y = 0;