diff options
author | Devaev Maxim <[email protected]> | 2020-11-14 18:18:53 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-11-14 18:18:53 +0300 |
commit | a9c844acb467089112f64f01923b9618277f8616 (patch) | |
tree | 2f851178505d3ec8dbb10f22fabf5e19744a35ff /hid/src/main.cpp | |
parent | 58f60bb49f582fba5ac0810c07642e9313b33bfb (diff) |
refactoring
Diffstat (limited to 'hid/src/main.cpp')
-rw-r--r-- | hid/src/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hid/src/main.cpp b/hid/src/main.cpp index 4eeb9838..1bcd2162 100644 --- a/hid/src/main.cpp +++ b/hid/src/main.cpp @@ -82,7 +82,7 @@ uint8_t cmdMouseButtonEvent(const uint8_t *buffer) { // 2 bytes # define MOUSE_PAIR(_state, _button) \ _state & PROTO_CMD_MOUSE_BUTTON_##_button##_SELECT, \ _state & PROTO_CMD_MOUSE_BUTTON_##_button##_STATE - hid_mouse.sendMouseButtons( + hid_mouse.sendButtons( MOUSE_PAIR(main_state, LEFT), MOUSE_PAIR(main_state, RIGHT), MOUSE_PAIR(main_state, MIDDLE), @@ -104,14 +104,14 @@ uint8_t cmdMouseMoveEvent(const uint8_t *buffer) { // 4 bytes y |= (int)buffer[3]; y = (y + 32768) / 2; // See /kvmd/apps/otg/hid/keyboard.py for details - hid_mouse.sendMouseMove(x, y); + hid_mouse.sendMove(x, y); # endif return PROTO_RESP_OK; } uint8_t cmdMouseWheelEvent(const uint8_t *buffer) { // 2 bytes # ifdef HID_USB_MOUSE - hid_mouse.sendMouseWheel(buffer[1]); // Y only, X is not supported + hid_mouse.sendWheel(buffer[1]); // Y only, X is not supported # endif return PROTO_RESP_OK; } |