From 7eec8281ce1acf6d0d456cdfd6a3d60f11a1cc0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Sun, 26 Feb 2017 00:44:43 +0100 Subject: [PATCH] Remove arguments from HandleKeyboardEvents. --- right/src/action.c | 6 +++--- right/src/action.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/right/src/action.c b/right/src/action.c index 51ff3df..2afe047 100644 --- a/right/src/action.c +++ b/right/src/action.c @@ -116,7 +116,7 @@ void HandleMouseKey(usb_mouse_report_t *report, key_action_t key, const uint8_t wasPreviousMouseActionWheelAction = isWheelAction; } -void HandleKeyboardEvents(usb_keyboard_report_t *keyboardReport, usb_mouse_report_t *mouseReport) { +void HandleKeyboardEvents() { int scancodeIdx = 0; ActiveLayer = LAYER_ID_BASE; @@ -140,9 +140,9 @@ void HandleKeyboardEvents(usb_keyboard_report_t *keyboardReport, usb_mouse_repor key_action_t action = keyToAction(slotId, keyId); if (action.type == KEY_ACTION_MOUSE) { - HandleMouseKey(mouseReport, action, PreviousKeyStates[slotId], CurrentKeyStates[slotId], keyId); + HandleMouseKey(&UsbMouseReport, action, PreviousKeyStates[slotId], CurrentKeyStates[slotId], keyId); } else { - if (handleKey(action, scancodeIdx, keyboardReport, PreviousKeyStates[slotId], CurrentKeyStates[slotId], keyId)) { + if (handleKey(action, scancodeIdx, ActiveUsbKeyboardReport, PreviousKeyStates[slotId], CurrentKeyStates[slotId], keyId)) { scancodeIdx++; } } diff --git a/right/src/action.h b/right/src/action.h index 6e2e62f..07eeb80 100644 --- a/right/src/action.h +++ b/right/src/action.h @@ -91,6 +91,6 @@ typedef struct { } __attribute__ ((packed)) key_action_t; void HandleMouseKey(usb_mouse_report_t *report, key_action_t key, const uint8_t *prevKeyStates, const uint8_t *currKeyStates, uint8_t keyId); -void HandleKeyboardEvents(usb_keyboard_report_t *keyboardReport, usb_mouse_report_t *mouseReport); +void HandleKeyboardEvents(); #endif