File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ getRumbleRight KEYWORD2
4747getLEDPatternID KEYWORD2
4848
4949# USB I/O
50+ connected KEYWORD2
5051send KEYWORD2
5152receive KEYWORD2
5253
Original file line number Diff line number Diff line change @@ -304,6 +304,14 @@ uint8_t XInputGamepad::getLEDPatternID() const {
304304 return (uint8_t )ledPattern;
305305}
306306
307+ boolean XInputGamepad::connected () {
308+ #ifdef USB_XINPUT
309+ return XInputUSB::connected ();
310+ #else
311+ return false ;
312+ #endif
313+ }
314+
307315// Send an update packet to the PC
308316size_t XInputGamepad::send () {
309317 if (!newData) return 0 ; // TX data hasn't changed
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ class XInputGamepad {
104104 XInputLEDPattern getLEDPattern () const ; // Returns LED pattern type
105105
106106 // USB IO
107+ boolean connected ();
107108 size_t send ();
108109 size_t receive ();
109110
You can’t perform that action at this time.
0 commit comments