Android: on-screen controls and touchpad input reach the console again #824
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
stale
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-streetpea/chiaki-ng!824
Loading…
Reference in a new issue
No description provided.
Delete branch "aoleg94/android-fix-touch-input"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Since #791 the on-screen buttons, sticks and touchpad don't reach the console at all (sticks are
drawn moving, nothing arrives). Two causes:
StreamActivity.onAttachFragmentcollectscontrollerStateof each controls fragment intocontrolsJob. The stream layout hosts two fragments (on-screen controls and touchpad-only),so attaching the second one cancelled the first one's collection. Both are now merged
(
mergeControllerStates,combine+or).ControllerState.copy()shared theControllerTouchobjects whileequalscompares touches bycontent, so the touchpad's
MutableStateFlowsaw later touch changes in already publishedstates and dropped touch moves and lifts as duplicates. Each state now owns its touches.
Taps and holds on the touchpad stick on the console until #823 is merged; the
cause is shared code, not Android.
Testing
ControllerStateMergeTest;ControllerStateTestgains copy/touch tests that fail beforethe fix.
./gradlew testDebugUnitTestpasses.Notes
Developed with the assistance of Claude Code, and tested on real hardware as described above.
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.