Forgot cast in getButtonPress

This commit is contained in:
Kristian Sloth Lauszus 2013-10-31 00:48:09 +01:00
parent 3c3b8ec986
commit b76dd913ca

View file

@ -282,7 +282,7 @@ uint8_t XBOXUSB::getButtonPress(Button b) {
return (uint8_t)(ButtonState >> 8); return (uint8_t)(ButtonState >> 8);
else if (b == R2) else if (b == R2)
return (uint8_t)ButtonState; return (uint8_t)ButtonState;
return (ButtonState & ((uint32_t)pgm_read_word(&XBOXBUTTONS[(uint8_t)b]) << 16)); return (bool)(ButtonState & ((uint32_t)pgm_read_word(&XBOXBUTTONS[(uint8_t)b]) << 16));
} }
bool XBOXUSB::getButtonClick(Button b) { bool XBOXUSB::getButtonClick(Button b) {