Skip to content
MaulingMonkey edited this page Jan 13, 2022 · 11 revisions

xinput

API

  • expose secret by-ordinal functions
  • switch to u32 user indicies
  • make audio dynamic/weak linking opt-in (by env var? should be controlled by app?)
  • expose deadzone constants
  • provide deadzone utility functions
  • provide API for background thread driven xinput queries
    "For performance reasons, don't call XInputGetState for an 'empty' user slot every frame. We recommend that you space out checks for new controllers every few seconds instead." [docs.microsoft.com]

Examples

  • support keystroke events
  • support guide button
  • show controller connectivity (which controller(s) are connected)
  • show controller battery state
  • headset audio

Meta

  • more human-friendly docs (replace C++ identifiers with short descriptions in heading 1-liners)
  • stabilize as a separate re-exported crate
  • more/better pre-COM tests

Testing

  • test on older windows
  • test on older xinput
  • test chatpads
  • test headsets
Clone this wiki locally