mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-23 00:36:42 -10:00
A touchscreen reports each finger as an ellipse, not a point; Android gives its axes and orientation (AMotionEvent_getTouchMajor/Minor and getOrientation). A thumb laid across up and right, or resting between two face buttons, covers both - and read by its centre alone presses one. After RetroArch-Lite's contact-area input. "D-Pad Input Method" and "ABXY Input Method" choose how each reads a touch: "Direction" - the way the centre lies, as always, and the default - "Contact Area", every way the contact covers, or "Both". Each tip of the ellipse's two axes presses the way it lies from the area's middle, past a small dead zone there. "Contact Area Size" scales how large a contact counts. Measured in pixels per axis against the pointer's own space; RetroArch-Lite measured both against the screen's height, which skews a contact on a wide screen. Android's reader keeps each pointer's contact beside its position, and the driver hands them to the frontend each poll (input_driver_publish_touch_contacts). A finger with no contact size, and every other driver, read by the centre's way. The rows show on Android, where an overlay has the area they apply to. overlay_contact_test holds the geometry: fingertips, thumbs across two ways, upright and level contacts, magnification, wide screens.