summaryrefslogtreecommitdiff
path: root/main_gui.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2005-01-30 16:54:39 +0000
committerdarkvater <darkvater@openttd.org>2005-01-30 16:54:39 +0000
commitb33e5d9ee0d08e607984bca4c548a23c8c165b9c (patch)
tree49b3e495609d4e23cf7be92ce87f031d35282063 /main_gui.c
parent121f563dafce14e34d9708485d22cee926ae8348 (diff)
downloadopenttd-b33e5d9ee0d08e607984bca4c548a23c8c165b9c.tar.xz
(svn r1734) - Fix: [ 1112253 ] hijacking of arrow keys, game also scrolled when it was out of focus (dominik)
Diffstat (limited to 'main_gui.c')
-rw-r--r--main_gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main_gui.c b/main_gui.c
index 6fac303a3..3a754e69b 100644
--- a/main_gui.c
+++ b/main_gui.c
@@ -2202,7 +2202,7 @@ static void StatusBarWndProc(Window *w, WindowEvent *e)
}
}
-void ScrollMainViewport(int x, int y)
+static void ScrollMainViewport(int x, int y)
{
if (_game_mode != GM_MENU) {
Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
@@ -2250,7 +2250,7 @@ static const int8 scrollamt[16][2] = {
void HandleKeyScrolling(void)
{
- if (_dirkeys) {
+ if (_dirkeys && _iconsole_win == NULL) {
int factor = _shift_pressed ? 50 : 10;
ScrollMainViewport(scrollamt[_dirkeys][0] * factor, scrollamt[_dirkeys][1] * factor);
}