diff options
Diffstat (limited to 'hid/src/main.cpp')
-rw-r--r-- | hid/src/main.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/hid/src/main.cpp b/hid/src/main.cpp index 7d575b54..a512b65b 100644 --- a/hid/src/main.cpp +++ b/hid/src/main.cpp @@ -284,29 +284,29 @@ static void _sendResponse(uint8_t code) { response[2] = PROTO::OUTPUTS1::DYNAMIC; # endif if (_usb_kbd) { - response[1] |= _usb_kbd->isOffline() ? PROTO::PONG::KEYBOARD_OFFLINE : 0; + response[1] |= (_usb_kbd->isOffline() ? PROTO::PONG::KEYBOARD_OFFLINE : 0); KeyboardLedsState leds = _usb_kbd->getLeds(); - response[1] |= leds.caps ? PROTO::PONG::CAPS : 0; - response[1] |= leds.num ? PROTO::PONG::NUM : 0; - response[1] |= leds.scroll ? PROTO::PONG::SCROLL : 0; + response[1] |= (leds.caps ? PROTO::PONG::CAPS : 0); + response[1] |= (leds.num ? PROTO::PONG::NUM : 0); + response[1] |= (leds.scroll ? PROTO::PONG::SCROLL : 0); response[2] |= PROTO::OUTPUTS1::KEYBOARD::USB; } else if (_ps2_kbd) { - response[1] |= _ps2_kbd->isOffline() ? PROTO::PONG::KEYBOARD_OFFLINE : 0; + response[1] |= (_ps2_kbd->isOffline() ? PROTO::PONG::KEYBOARD_OFFLINE : 0); KeyboardLedsState leds = _usb_kbd->getLeds(); - response[1] |= leds.caps ? PROTO::PONG::CAPS : 0; - response[1] |= leds.num ? PROTO::PONG::NUM : 0; - response[1] |= leds.scroll ? PROTO::PONG::SCROLL : 0; + response[1] |= (leds.caps ? PROTO::PONG::CAPS : 0); + response[1] |= (leds.num ? PROTO::PONG::NUM : 0); + response[1] |= (leds.scroll ? PROTO::PONG::SCROLL : 0); response[2] |= PROTO::OUTPUTS1::KEYBOARD::PS2; } if (_usb_mouse_abs) { - response[1] |= _usb_mouse_abs->isOffline() ? PROTO::PONG::MOUSE_OFFLINE : 0; + response[1] |= (_usb_mouse_abs->isOffline() ? PROTO::PONG::MOUSE_OFFLINE : 0); if (_usb_mouse_abs->isWin98FixEnabled()) { response[2] |= PROTO::OUTPUTS1::MOUSE::USB_WIN98; } else { response[2] |= PROTO::OUTPUTS1::MOUSE::USB_ABS; } } else if (_usb_mouse_rel) { - response[1] |= _usb_mouse_rel->isOffline() ? PROTO::PONG::MOUSE_OFFLINE : 0; + response[1] |= (_usb_mouse_rel->isOffline() ? PROTO::PONG::MOUSE_OFFLINE : 0); response[2] |= PROTO::OUTPUTS1::MOUSE::USB_REL; } // TODO: ps2 # ifdef AUM |