diff options
author | Javier <dev.git@javispedro.com> | 2024-09-05 01:30:15 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2024-09-05 01:30:15 +0200 |
commit | 58fe8e22096863f86b2916dd388401f7afc1d26c (patch) | |
tree | 3d03b8e51fe5fc272705cd67873737ec077247ee | |
parent | 076febba4f5e42604dac5eb46d7955a2e27c5dd5 (diff) | |
download | vbados-master.tar.gz vbados-master.zip |
-rw-r--r-- | mousetsr.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -766,10 +766,13 @@ static void handle_ps2_packet(void) if (data.ps2_packet[3] & PS2M_IMEX_VERTICAL_SCROLL) { // Vertical scrolling, with 6 bits of precision. z = sign_extend(data.ps2_packet[3], 6); + // Assume 4th/5th buttons are still pressed if they were + buttons |= data.buttons & (INT33_BUTTON_MASK_4TH|INT33_BUTTON_MASK_5TH); } else if (data.ps2_packet[3] & PS2M_IMEX_HORIZONTAL_SCROLL) { // Horizontal scrolling, with 6 bits of precision. z = sign_extend(data.ps2_packet[3], 6); wheeln = 1; + buttons |= data.buttons & (INT33_BUTTON_MASK_4TH|INT33_BUTTON_MASK_5TH); } else { // Or 2 extra buttons (4, 5) if (data.ps2_packet[3] & PS2M_IMEX_BUTTON_4) { |