summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-07-22 13:16:49 +0000
committerpeter1138 <peter1138@openttd.org>2007-07-22 13:16:49 +0000
commit0c3b6a72855ccf67908fe61943d031201ca9f642 (patch)
tree4a5ba35bf86e66c881a16fac5c79e73e27043e5b /src
parent692f20c3c3c960d6359757b1b3bc9eb3e0d3187f (diff)
downloadopenttd-0c3b6a72855ccf67908fe61943d031201ca9f642.tar.xz
(svn r10649) -Fix (r9962): autoscroll (pointer near screen edge) didn't work
Diffstat (limited to 'src')
-rw-r--r--src/window.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 325242b3a..819c8ffc3 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -1619,14 +1619,14 @@ static void HandleAutoscroll()
/* here allows scrolling in both x and y axis */
#define scrollspeed 3
if (x - 15 < 0) {
- WP(w, vp_d).scrollpos_x += ScaleByZoom((x - 15) * scrollspeed, vp->zoom);
+ WP(w, vp_d).dest_scrollpos_x += ScaleByZoom((x - 15) * scrollspeed, vp->zoom);
} else if (15 - (vp->width - x) > 0) {
- WP(w, vp_d).scrollpos_x += ScaleByZoom((15 - (vp->width - x)) * scrollspeed, vp->zoom);
+ WP(w, vp_d).dest_scrollpos_x += ScaleByZoom((15 - (vp->width - x)) * scrollspeed, vp->zoom);
}
if (y - 15 < 0) {
- WP(w, vp_d).scrollpos_y += ScaleByZoom((y - 15) * scrollspeed, vp->zoom);
+ WP(w, vp_d).dest_scrollpos_y += ScaleByZoom((y - 15) * scrollspeed, vp->zoom);
} else if (15 - (vp->height - y) > 0) {
- WP(w,vp_d).scrollpos_y += ScaleByZoom((15 - (vp->height - y)) * scrollspeed, vp->zoom);
+ WP(w, vp_d).dest_scrollpos_y += ScaleByZoom((15 - (vp->height - y)) * scrollspeed, vp->zoom);
}
#undef scrollspeed
}