File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,6 +167,16 @@ struct XInputMap_Rumble {
167167static const XInputMap_Rumble RumbleLeft (3 , 0 ); // Large motor
168168static const XInputMap_Rumble RumbleRight (4 , 1 ); // Small motor
169169
170+ // --------------------------------------------------------
171+ // XInput USB Receive Callback |
172+ // --------------------------------------------------------
173+
174+ #ifdef USB_XINPUT
175+ static void XInputLib_Receive_Callback () {
176+ XInput.receive ();
177+ }
178+ #endif
179+
170180
171181// --------------------------------------------------------
172182// XInputGamepad Class (API) |
@@ -176,6 +186,9 @@ XInputGamepad::XInputGamepad() :
176186 tx(), rumble() // Zero initialize arrays
177187{
178188 reset ();
189+ #ifdef USB_XINPUT
190+ XInputUSB::setRecvCallback (XInputLib_Receive_Callback);
191+ #endif
179192}
180193
181194void XInputGamepad::press (XInputControl button) {
You can’t perform that action at this time.
0 commit comments