mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-17 12:03:07 +01:00
fixes #357, glitchy viewport dragging
This commit is contained in:
@@ -792,9 +792,12 @@ static void game_handle_input_mouse(int x, int y, int state)
|
||||
case INPUT_STATE_VIEWPORT_DRAG:
|
||||
{
|
||||
int dx, dy;
|
||||
|
||||
POINT newDragPosition;
|
||||
GetCursorPos(&newDragPosition);
|
||||
|
||||
dx = x - RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DRAG_LAST_X, sint16);
|
||||
dy = y - RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DRAG_LAST_Y, sint16);
|
||||
dx = newDragPosition.x - _dragPosition.x;
|
||||
dy = newDragPosition.y - _dragPosition.y;
|
||||
w = window_find_by_id(RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DRAG_WINDOWCLASS, rct_windowclass), RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_DRAG_WINDOWNUMBER, rct_windownumber));
|
||||
if (state == 0) {
|
||||
rct_viewport *viewport = w->viewport;
|
||||
|
||||
Reference in New Issue
Block a user