Commit Graph

8 Commits

Author SHA1 Message Date
a1ca84f95e Move Kotlin settings to a dedicate package 2023-02-27 19:56:53 +01:00
9e1c9caa36 input: Fix motion orientation based on phone orientation 2023-02-07 16:16:41 +00:00
56d43a70c0 Implement SixAxis sensor 2023-02-07 16:16:41 +00:00
b209ae8e90 Account for stick flat area when retrieving axes value from a MotionEvent 2022-11-17 21:54:15 +01:00
c966220bab Zero-initialize axes history instead of using null values
Use zero initialization for axes history instead of using null values. Fixes the first axis event after launching a game being completely ignored.
2022-11-17 21:54:15 +01:00
3a657c44cc Don't ignore HAT axes input events
Capture HAT axes events ourselves instead of relying on the android framework to turn them into KeyCodes. Fixes handling of DPAD button presses on most controllers.
2022-11-17 21:54:15 +01:00
f1ec771944 Fix inverted axis polarity
In the case of axis value being zero, polarity would favor one side of the stick resulting in invalid values. Fix that by taking into account axis history when calculating polarity.
2022-11-17 21:54:15 +01:00
675e8dbb2e Move input handling code to a dedicated class 2022-11-17 21:54:15 +01:00