Commit 3de4f3a
committed
gameactivity: don't discard stylus touchscreen inputs
I noticed touch inputs weren't working on my Galaxy S9 tab device which
includes a stylus. The value was 0xD002 for source, which seems to be:
SOURCE_CLASS_POINTER 0b0000 0000 0000 0010
SOURCE_STYLUS 0b0100 0000 0000 0000
SOURCE_BLUETOOTH_STYLUS 0b1000 0000 0000 0000
SOURCE_TOUCHSCREEN 0b0001 0000 0000 0000
----------------------------------------------
0xD002 = 0b1101 0000 0000 0010
Let's modify default_motion_filter to use bitwise AND (&) instead of
equality (==) when checking SOURCE_TOUCHSCREEN. This ensures stylus
inputs (which combine touchscreen and stylus flags) are not discarded,
while still filtering non-touch events.
Changelog-Fixed: Fix touch inputs on tablets with a stylus
Signed-off-by: William Casarin <[email protected]>1 parent 8e80d8a commit 3de4f3a
File tree
1 file changed
+1
-1
lines changed- android-activity/game-activity-csrc/game-activity/native_app_glue
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
| 267 | + | |
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| |||
0 commit comments