X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fgamepad.cpp;h=1ef1a4e78fdd37877c4b26d4c9ac54b0f2810c5a;hb=9af4fb023287b26dce01a36c65c9e30f56481051;hp=6ca2329a02cf20ab737bdca253cdc37bb7552f43;hpb=5c28b6dbf7aa20441c8a51f484f4f64b1966f7e3;p=virtualjaguar diff --git a/src/gui/gamepad.cpp b/src/gui/gamepad.cpp index 6ca2329..1ef1a4e 100644 --- a/src/gui/gamepad.cpp +++ b/src/gui/gamepad.cpp @@ -76,7 +76,6 @@ bool Gamepad::GetState(int joystickID, int buttonID) { // Handle SDL button int buttonNum = (buttonID & JOY_BUTTON_MASK); -// SDL_JoystickGetButton(pad[joystickID]); return button[joystickID][buttonNum]; } else if (buttonID & JOY_HAT) @@ -84,8 +83,6 @@ bool Gamepad::GetState(int joystickID, int buttonID) // Handle SDL hats int hatNumber = (buttonID & JOY_HATNUM_MASK) >> 3; uint8_t hatDirection = hatMask[buttonID & JOY_HATBUT_MASK]; -// uint8 direction = SDL_JoystickGetHat(pad[joystickID], hatNumber); -// return ( return (hat[joystickID][hatNumber] & hatDirection ? true : false); } @@ -153,6 +150,7 @@ void Gamepad::Update(void) #if 0 // Need to test this. It may be that the only time joysticks are detected is // when the program is first run. That would suck. +// Well, it turns out that SDL doesn't do hot plugging. :-( void Gamepad::CheckConsistency(void) { int currentNumJoysticks = SDL_NumJoysticks();