#state #padstate

no-std padstate

Tiny structs that hold a game controller's state

7 releases

new 0.2.5 Mar 30, 2025
0.2.4 Mar 30, 2025
0.1.0 Mar 6, 2025

#154 in No standard library

Download history 446/week @ 2025-03-05 13/week @ 2025-03-12 4/week @ 2025-03-19

463 downloads per month
Used in mini_sdl

MIT license

8KB
145 lines

[DPad] is A tiny (4 bytes) struct that contains the state of a "virtual gamepad", allowing a game to abstract the player input from the windowing back-end. It does not perform polling or querying the device, it simply stores the current and previous state.

[APad] contains all the buttons in a DPad, plus an analogue left stick. Will add more axis later.

No runtime deps