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

Fixing issue where Android gesture inputs were broken #73554

Merged

Conversation

katemonster33
Copy link
Contributor

Summary

Bugfixes "Fixed issue where Android gesture inputs were not recognized by ImGui windows"

Purpose of change

Fixes: #73260

Describe the solution

I read up on what "input trickling" does after #73180 seemed to cause this issue and discovered that, if a key is pressed and released incredibly rapidly (which was how the "fake" gesture inputs looked to ImGui) then the input would be ignored.

So what I did was, send the fake input as a key pressed event to ImGui, then, at the end of the frame, I send the key released event. This way the input is not ignored.

Describe alternatives you've considered

Testing

Load Android build, open keybindings screen, verify that gestures work to scroll the keybindings list.

Additional context

@github-actions github-actions bot added Info / User Interface Game - player communication, menus, etc. [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) labels May 7, 2024
src/cata_imgui.cpp Outdated Show resolved Hide resolved
src/cata_imgui.cpp Outdated Show resolved Hide resolved
src/cata_imgui.cpp Outdated Show resolved Hide resolved
src/cata_imgui.h Outdated Show resolved Hide resolved
@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions astyled astyled PR, label is assigned by github actions labels May 7, 2024
@katemonster33 katemonster33 force-pushed the android_navigation_imgui branch from 3694d5b to fab50dc Compare May 7, 2024 14:19
@Maleclypse Maleclypse merged commit 75f6a42 into CleverRaven:master May 9, 2024
21 of 25 checks passed
@katemonster33 katemonster33 deleted the android_navigation_imgui branch May 10, 2024 22:19
SurFlurer added a commit to SurFlurer/Cataclysm-DDA that referenced this pull request Aug 26, 2024
…id_navigation_imgui"

This reverts commit 75f6a42, reversing
changes made to 88e09a5.
This
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Info / User Interface Game - player communication, menus, etc. json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android ImGui cannot be navigated
2 participants