From d9d8a91817ba1c63b910e5ddb9f277ca1907105b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Thu, 13 Jun 2019 14:54:41 +0200 Subject: [PATCH] Scroll instead of moving the pointer with the blackberry trackball. --- right/src/usb_report_updater.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/right/src/usb_report_updater.c b/right/src/usb_report_updater.c index 847f5c6..0ceb928 100644 --- a/right/src/usb_report_updater.c +++ b/right/src/usb_report_updater.c @@ -169,22 +169,22 @@ static void processMouseActions() MouseMoveState.xOut = 0; MouseMoveState.yOut = 0; - for (uint8_t moduleId=0; moduleIdpointerCount) { - ActiveUsbMouseReport->x += moduleState->pointerDelta.x; - ActiveUsbMouseReport->y += moduleState->pointerDelta.y; - moduleState->pointerDelta.x = 0; - moduleState->pointerDelta.y = 0; - } - } - processMouseKineticState(&MouseScrollState); ActiveUsbMouseReport->wheelX = MouseScrollState.xOut; ActiveUsbMouseReport->wheelY = MouseScrollState.yOut; MouseScrollState.xOut = 0; MouseScrollState.yOut = 0; + for (uint8_t moduleId=0; moduleIdpointerCount) { + ActiveUsbMouseReport->wheelX += moduleState->pointerDelta.x; + ActiveUsbMouseReport->wheelY -= moduleState->pointerDelta.y; + moduleState->pointerDelta.x = 0; + moduleState->pointerDelta.y = 0; + } + } + // The following line makes the firmware crash for some reason: // SetDebugBufferFloat(60, mouseScrollState.currentSpeed); // TODO: Figure out why.