Fixed error=parentheses warning

This commit is contained in:
Kristian Sloth Lauszus 2016-04-19 17:27:12 +02:00
parent 14021813ef
commit 51dde0252e

View file

@ -43,11 +43,12 @@ void JoystickReportParser::Parse(USBHID *hid, bool is_rpt_id, uint8_t len, uint8
for (uint8_t i = 0; i < 0x0C; i++) { for (uint8_t i = 0; i < 0x0C; i++) {
uint16_t mask = (0x0001 << i); uint16_t mask = (0x0001 << i);
if (((mask & changes) > 0) && joyEvents) if (((mask & changes) > 0) && joyEvents) {
if ((buttons & mask) > 0) if ((buttons & mask) > 0)
joyEvents->OnButtonDn(i + 1); joyEvents->OnButtonDn(i + 1);
else else
joyEvents->OnButtonUp(i + 1); joyEvents->OnButtonUp(i + 1);
}
} }
oldButtons = buttons; oldButtons = buttons;
} }