mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Fixed bug in getButtonPress
This commit is contained in:
parent
9af835e8fe
commit
78cb524bcf
1 changed files with 1 additions and 1 deletions
|
@ -386,7 +386,7 @@ uint8_t XBOXRECV::getButtonPress(uint8_t controller, Button b) {
|
|||
return (uint8_t)(ButtonState[controller] >> 8);
|
||||
else if (b == R2)
|
||||
return (uint8_t)ButtonState[controller];
|
||||
return (ButtonState[controller] & ((uint32_t)pgm_read_word(&XBOXBUTTONS[(uint8_t)b]) << 16));
|
||||
return (bool)(ButtonState[controller] & ((uint32_t)pgm_read_word(&XBOXBUTTONS[(uint8_t)b]) << 16));
|
||||
}
|
||||
|
||||
bool XBOXRECV::getButtonClick(uint8_t controller, Button b) {
|
||||
|
|
Loading…
Reference in a new issue