mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-08 07:21:53 +00:00
Codechange: Simplify logic of mouse loop
This commit is contained in:
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
Block a user