raylib/src/platforms
Tubbles a005a044da
[rcore_android] Restore face-button input on Android gamepads (#5824)
The KEYBOARD-source veto added in #5439 drops face-button key
events that arrive with both AINPUT_SOURCE_KEYBOARD and
AINPUT_SOURCE_GAMEPAD set on the source bitmask. Confirmed
reproducible on GameSir X2 Type-C and 8BitDo Ultimate Bluetooth,
both reporting source 0x501 on every face-button key event.

This source-bit pattern is general AOSP behaviour since Android
3.2 (commit 6f2fba4 in frameworks/base, Feb 2011): EventHub adds
InputDeviceClass::KEYBOARD to any device whose evdev keyBitmask
claims gamepad buttons (BTN_JOYSTICK..BTN_DIGI), and
KeyboardInputMapper::getEventSource stamps the resulting
KEYBOARD|GAMEPAD source on every outgoing key event.

Use AndroidTranslateGamepadButton(keycode) as the discriminator
instead. Recognised gamepad keycodes route to the gamepad path;
unknown keycodes fall through to the keyboard handler.

Assisted-by: Claude:claude-opus-4-7
2026-05-10 19:20:35 +02:00
..
rcore_android.c [rcore_android] Restore face-button input on Android gamepads (#5824) 2026-05-10 19:20:35 +02:00
rcore_desktop_glfw.c REVIEWED: long long usage in all raylib, minimize 2026-05-08 22:59:55 +02:00
rcore_desktop_rgfw.c REVIEWED: long long usage in all raylib, minimize 2026-05-08 22:59:55 +02:00
rcore_desktop_sdl.c SDL: Use precise mouse wheel values (#5830) 2026-05-01 19:29:51 +02:00
rcore_desktop_win32.c Code cleaning 2026-05-07 15:18:42 +02:00
rcore_drm.c REVIEWED: long long usage in all raylib, minimize 2026-05-08 22:59:55 +02:00
rcore_memory.c REVIEWED: long long usage in all raylib, minimize 2026-05-08 22:59:55 +02:00
rcore_template.c REVIEWED: long long usage in all raylib, minimize 2026-05-08 22:59:55 +02:00
rcore_web_emscripten.c REVIEWED: Comments for consistency and spelling 2026-04-27 11:34:58 +02:00
rcore_web.c Update rcore_web.c 2026-05-02 09:09:40 +02:00