summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@serenityos.org>2020-02-03 19:29:40 +0300
committerAndreas Kling <kling@serenityos.org>2020-02-04 19:11:52 +0100
commit0334656e45c6fd53f1d37e80d3ca360825368544 (patch)
treef977fc851572c9bfe7d2719b8f744333923c6caa /Kernel
parent6c9d66ed4b686dcfaa02f9c89fcc3812a0acedf8 (diff)
downloadserenity-0334656e45c6fd53f1d37e80d3ca360825368544.zip
Kernel: Stub absolute mouse positioning support
This is not the real kernel patch, @supercomputer7 is doing that :^)
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Devices/PS2MouseDevice.cpp6
-rw-r--r--Kernel/MousePacket.h7
2 files changed, 7 insertions, 6 deletions
diff --git a/Kernel/Devices/PS2MouseDevice.cpp b/Kernel/Devices/PS2MouseDevice.cpp
index 6a1e178560..17eccbdc93 100644
--- a/Kernel/Devices/PS2MouseDevice.cpp
+++ b/Kernel/Devices/PS2MouseDevice.cpp
@@ -139,9 +139,9 @@ void PS2MouseDevice::parse_data_packet()
y = 0;
}
MousePacket packet;
- packet.dx = x;
- packet.dy = y;
- packet.dz = z;
+ packet.x = x;
+ packet.y = y;
+ packet.z = z;
packet.buttons = m_data[0] & 0x07;
m_queue.enqueue(packet);
diff --git a/Kernel/MousePacket.h b/Kernel/MousePacket.h
index ebb19d97e4..a6c93f151a 100644
--- a/Kernel/MousePacket.h
+++ b/Kernel/MousePacket.h
@@ -27,8 +27,9 @@
#pragma once
struct MousePacket {
- int dx { 0 };
- int dy { 0 };
- int dz { 0 };
+ int x { 0 };
+ int y { 0 };
+ int z { 0 };
unsigned char buttons { 0 };
+ bool is_relative { true };
};