Skip to content
Commit 461faf9d authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Process joystick MotionEvents correctly.

Joystick MotionEvents, such as AXIS_HAT0Y and AXIS_HAT0X,
are translated into KeyEvents KEYCODE_DPAD_UP,
KEYCODE_DPAD_DOWN, etc for navigating menus. When two or more
AXIS_HAT0Y events are batched into a single event, this would
not be recognized by the SyntheticJoystickHandler as a down/up
event, thus missing the event entirely. This commit updates
SyntheticJoystickHandler to use the entire MotionEvent,
including the HistoricalEvent portions.

Bug: 36069459
Test: Connected Sony DS4 joystick, recorded the event
that reproduces the bug with inputstudio. Replayed the
event after patch, the bug could not be reproduced.

Change-Id: I7c15c3a7c9ac326481214b1f6b553ae39c459bc4
parent 27358ef4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment