summaryrefslogtreecommitdiff
path: root/Kernel/Devices/VMWareBackdoor.cpp
diff options
context:
space:
mode:
authorTom <tomut@yahoo.com>2021-02-28 13:58:21 -0700
committerAndreas Kling <kling@serenityos.org>2021-03-01 11:10:10 +0100
commitb4c1b96d96d6cd3abb5c6824418f6d3c5f938fe0 (patch)
treefdc99b66b96aabdb1f035b35f90874fffbb1e74f /Kernel/Devices/VMWareBackdoor.cpp
parent152af3a29793681feb3170f9b3801eb52992bab5 (diff)
downloadserenity-b4c1b96d96d6cd3abb5c6824418f6d3c5f938fe0.zip
Kernel: Fix scrolling up in VMware
The mouse wheel delta is provided as a signed 8 bit value.
Diffstat (limited to 'Kernel/Devices/VMWareBackdoor.cpp')
-rw-r--r--Kernel/Devices/VMWareBackdoor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Devices/VMWareBackdoor.cpp b/Kernel/Devices/VMWareBackdoor.cpp
index d69cc31d9b..87311ceb26 100644
--- a/Kernel/Devices/VMWareBackdoor.cpp
+++ b/Kernel/Devices/VMWareBackdoor.cpp
@@ -231,7 +231,7 @@ Optional<MousePacket> 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);