We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 42438a4 commit 5b64f3aCopy full SHA for 5b64f3a
1 file changed
src/XInput.cpp
@@ -307,12 +307,15 @@ uint8_t XInputGamepad::getLEDPatternID() const {
307
308
//Send an update packet to the PC
309
void XInputGamepad::send() {
310
+#ifdef USB_XINPUT
311
if (!newData) return; // TX data hasn't changed
312
XInputUSB.send(tx, USB_Timeout);
313
newData = false;
314
+#endif
315
}
316
317
void XInputGamepad::receive() {
318
319
if (XInputUSB.available() == 0) {
320
return; // No packet available
321
@@ -330,6 +333,7 @@ void XInputGamepad::receive() {
330
333
else if (rx[0] == 0x01) {
331
334
parseLED(rx[2]);
332
335
336
337
338
339
void XInputGamepad::parseLED(uint8_t leds) {
0 commit comments