From d1baf094af2e7fbd1d314cc3457460a5662df94b Mon Sep 17 00:00:00 2001 From: Meehoi Date: Sat, 5 Nov 2022 14:20:53 +0700 Subject: [PATCH] Show cursor when using inverted mouse dragging (#17998) --- distribution/changelog.txt | 1 + src/openrct2-ui/input/MouseInput.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 024514b957..176c0ddc4b 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -5,6 +5,7 @@ - Improved: [#18214] Competition scenarios have received their own section. - Improved: [#18250] Added modern style file and folder pickers on Windows. - Improved: [#18422] Allow adding images to music objects. +- Change: [#17998] Show cursor when using inverted mouse dragging. - Change: [#18230] Make the large flat to steep pieces available on the corkscrew roller coaster without cheats. - Change: [#18381] Convert custom invisible paths to the built-in ones. - Fix: [#14312] Research ride type message incorrect. diff --git a/src/openrct2-ui/input/MouseInput.cpp b/src/openrct2-ui/input/MouseInput.cpp index ca24cab8f2..6fdcdefaf2 100644 --- a/src/openrct2-ui/input/MouseInput.cpp +++ b/src/openrct2-ui/input/MouseInput.cpp @@ -526,7 +526,10 @@ static void InputViewportDragBegin(rct_window& w) _ticksSinceDragStart = 0; auto cursorPosition = context_get_cursor_position(); gInputDragLast = cursorPosition; - context_hide_cursor(); + if (!gConfigGeneral.InvertViewportDrag) + { + context_hide_cursor(); + } window_unfollow_sprite(w); // gInputFlags |= INPUT_FLAG_5; @@ -581,7 +584,7 @@ static void InputViewportDragContinue() } } - if (cursorState->touch) + if (cursorState->touch || gConfigGeneral.InvertViewportDrag) { gInputDragLast = newDragCoords; }