From 47d1a6b8b69a1a7e6a6e6055a038e61feb6d9a8f Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Thu, 3 Jan 2013 20:18:23 +0100 Subject: [PATCH] Fixed support for multiple controllers Thanks Tim: http://blog.tkjelectronics.dk/2012/12/xbox-360-receiver-added-to-the-usb -host-library/#comment-262631 --- XBOXRECV.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XBOXRECV.cpp b/XBOXRECV.cpp index 9f8548f7..e37908e7 100644 --- a/XBOXRECV.cpp +++ b/XBOXRECV.cpp @@ -261,8 +261,8 @@ uint8_t XBOXRECV::Release() { uint8_t XBOXRECV::Poll() { if (!bPollEnable) return 0; - uint16_t BUFFER_SIZE = EP_MAXPKTSIZE; for(uint8_t i=0;i<4;i++) { + uint16_t BUFFER_SIZE = EP_MAXPKTSIZE; switch (i) { case 0: pUsb->inTransfer(bAddress, epInfo[ XBOX_INPUT_PIPE_1 ].epAddr, &BUFFER_SIZE, readBuf);