From 24ff4a24982dd2d091f1579b4727974fe1745315 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 12 Aug 2023 12:10:35 +0200 Subject: [PATCH] Make sure bit 3 of the first PS/2 mouse packet is always set. --- src/device/mouse_ps2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device/mouse_ps2.c b/src/device/mouse_ps2.c index f623d23e9..2d0f3c85d 100644 --- a/src/device/mouse_ps2.c +++ b/src/device/mouse_ps2.c @@ -86,7 +86,7 @@ ps2_report_coordinates(atkbc_dev_t *dev, int main) -256, 255, 1, 0); mouse_subtract_z(&delta_z, -8, 7, 1); - buff[0] = (overflow_y << 7) | (overflow_x << 6) | + buff[0] |= (overflow_y << 7) | (overflow_x << 6) | ((delta_y & 0x0100) >> 3) | ((delta_x & 0x0100) >> 4) | (b & ((dev->flags & FLAG_INTELLI) ? 0x07 : 0x03)); buff[1] = (delta_x & 0x00ff);