Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use correct mCursorActive flag initial value #3049

Merged
merged 1 commit into from
Mar 7, 2021

Conversation

akortunov
Copy link
Collaborator

@akortunov akortunov commented Mar 7, 2021

Initially when Scrawl added a keyboard navigation, he decided to disable cursor by default, but such behaviour was later rolled back since it is not intuitive and a deviation from vanilla game.

Now an only case when cursor can be not active is when SDL_CONTROLLER_BUTTON_LEFTSTICK button is pressed on gamepad:

            case SDL_CONTROLLER_BUTTON_LEFTSTICK:
                mGamepadGuiCursorEnabled = !mGamepadGuiCursorEnabled;
                MWBase::Environment::get().getWindowManager()->setCursorActive(mGamepadGuiCursorEnabled);
                return true;

By default, mGamepadGuiCursorEnabled = true, so it is expected that mCursorActive should be also true by default (as mCursorVisible already does).

Current upstream behaviour works well on PC since SDL for some reason generates a couple of mouse events during game start and they enable in-game cursor (probably these events are supposed to init cursor position), but on platforms without mouse (e.g. Android) it may lead to issues due to lack of such emitted events.

According to testing, this PR allows to drop this custom patch.

@AnyOldName3 AnyOldName3 merged commit 213525c into OpenMW:master Mar 7, 2021
Allofich added a commit to Allofich/openmw that referenced this pull request Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants