From b4c1b96d96d6cd3abb5c6824418f6d3c5f938fe0 Mon Sep 17 00:00:00 2001 From: Tom Date: Sun, 28 Feb 2021 13:58:21 -0700 Subject: [PATCH] Kernel: Fix scrolling up in VMware The mouse wheel delta is provided as a signed 8 bit value. --- Kernel/Devices/VMWareBackdoor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Devices/VMWareBackdoor.cpp b/Kernel/Devices/VMWareBackdoor.cpp index d69cc31d9b4..87311ceb26a 100644 --- a/Kernel/Devices/VMWareBackdoor.cpp +++ b/Kernel/Devices/VMWareBackdoor.cpp @@ -231,7 +231,7 @@ Optional VMWareBackdoor::receive_mouse_packet() int buttons = (command.ax & 0xFFFF); int x = (command.bx); int y = (command.cx); - int z = (command.dx); + int z = (i8)(command.dx); // signed 8 bit value only! if constexpr (PS2MOUSE_DEBUG) { dbgln("Absolute Mouse: Buttons {:x}", buttons);