BrainStronk / TinyEngine

A tiny game engine written in C.
Creative Commons Zero v1.0 Universal
32 stars 1 forks source link

XInput Joystick Input #8

Open strangezakary opened 4 years ago

strangezakary commented 4 years ago

Pass along XInput gamepad input to the engine, so that it can do what it wants with it when it has its own input system defined.

XInput Controllers should be hot pluggable, but this is a fairly difficult problem as calling XInputGetState on controller that are not connected, add an extra 3-4 million cycles into your platform layers running loop. Therefore only call XInputGetState on all possible controller index's when WM_DEVICECHANGE is received.