mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Simplify logic of mouse loop
parent
65530a76f6
commit
e660860d4b
|
@ -2882,7 +2882,6 @@ static void MouseLoop(MouseClick click, int mousewheel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vp == nullptr || (w->flags & WF_DISABLE_VP_SCROLL)) {
|
|
||||||
switch (click) {
|
switch (click) {
|
||||||
case MC_LEFT:
|
case MC_LEFT:
|
||||||
case MC_DOUBLE_LEFT:
|
case MC_DOUBLE_LEFT:
|
||||||
|
@ -2903,7 +2902,6 @@ static void MouseLoop(MouseClick click, int mousewheel)
|
||||||
DispatchHoverEvent(w, x - w->left, y - w->top);
|
DispatchHoverEvent(w, x - w->left, y - w->top);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* We're not doing anything with 2D scrolling, so reset the value. */
|
/* We're not doing anything with 2D scrolling, so reset the value. */
|
||||||
_cursor.h_wheel = 0;
|
_cursor.h_wheel = 0;
|
||||||
|
|
Loading…
Reference in New Issue