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.
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 whenWM_DEVICECHANGE
is received.