pub type MaaGamepadTouch = u64;Expand description
@brief Virtual gamepad touch contact definitions for touch_down/touch_move/touch_up
For gamepad controller, the touch functions are repurposed for analog inputs:
- x, y: Analog stick position
- pressure: Trigger value (0~255)
Contact mapping:
| Contact | Input | x range | y range | pressure | Description |
|---|---|---|---|---|---|
| 0 | Left Stick | -32768~32767 | -32768~32767 | ignored | Left analog stick X/Y position |
| 1 | Right Stick | -32768~32767 | -32768~32767 | ignored | Right analog stick X/Y position |
| 2 | Left Trigger | ignored | ignored | 0~255 | Left trigger (LT/L2) value |
| 3 | Right Trigger | ignored | ignored | 0~255 | Right trigger (RT/R2) value |
Usage:
- touch_down(contact, x, y, pressure): Start analog input
- touch_move(contact, x, y, pressure): Update analog input position/value
- touch_up(contact): Release/reset analog input to center/zero