Changeset - r86:4aedada3622a
[Not reviewed]
master
0 1 0
dominik - 20 years ago 2004-08-20 11:25:36
dominik@openttd.org
(svn r87) Fix: rare mousewheel scrolling with scrollbar crash
1 file changed with 1 insertions and 2 deletions:
0 comments (0 inline, 0 general)
window.c
Show inline comments
 
@@ -85,8 +85,7 @@ void DispatchRightClickEvent(Window *w, 
 

	
 
void DispatchMouseWheelEvent(Window *w, int wheel)
 
{
 
	
 
	if (w->vscroll.count) {
 
	if (w->vscroll.count > w->vscroll.cap) {
 
		int pos = clamp(w->vscroll.pos + wheel, 0, w->vscroll.count - w->vscroll.cap);
 
		if (pos != w->vscroll.pos) {
 
			w->vscroll.pos = pos;
0 comments (0 inline, 0 general)