mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2024-09-02 15:41:07 +02:00
Replace shifting with multiplication when dragging (#3789)
`dx`, `dy` can be signed negative values, shifting them left is undefined.
This commit is contained in:
parent
27d846c2f4
commit
9d5827520a
1 changed files with 2 additions and 2 deletions
|
@ -553,8 +553,8 @@ static void input_viewport_drag_continue()
|
||||||
// As the user moved the mouse, don't interpret it as right click in any case.
|
// As the user moved the mouse, don't interpret it as right click in any case.
|
||||||
_ticksSinceDragStart = 1000;
|
_ticksSinceDragStart = 1000;
|
||||||
|
|
||||||
dx <<= viewport->zoom + 1;
|
dx *= 1 << (viewport->zoom + 1);
|
||||||
dy <<= viewport->zoom + 1;
|
dy *= 1 << (viewport->zoom + 1);
|
||||||
if (gConfigGeneral.invert_viewport_drag){
|
if (gConfigGeneral.invert_viewport_drag){
|
||||||
w->saved_view_x -= dx;
|
w->saved_view_x -= dx;
|
||||||
w->saved_view_y -= dy;
|
w->saved_view_y -= dy;
|
||||||
|
|
Loading…
Reference in a new issue