diff options
author | Maxim Devaev <[email protected]> | 2024-12-11 17:50:58 +0200 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2024-12-11 17:56:54 +0200 |
commit | adbd4f242b4478dd1a67de1afb3ba799de57f2d5 (patch) | |
tree | d40ab85fbe8fbc9a8274ac80f8099b3772947109 /hid | |
parent | 2649a2fa01a45ba3766cced3b244a8376df5091a (diff) |
pikvm/pikvm#1437: Don't reset absolute mouse position on clear
Diffstat (limited to 'hid')
-rw-r--r-- | hid/pico/src/ph_usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hid/pico/src/ph_usb.c b/hid/pico/src/ph_usb.c index a3d1da00..b56e2cc5 100644 --- a/hid/pico/src/ph_usb.c +++ b/hid/pico/src/ph_usb.c @@ -53,7 +53,7 @@ static u8 _kbd_keys[6] = {0}; static u8 _mouse_buttons = 0; static s16 _mouse_abs_x = 0; static s16 _mouse_abs_y = 0; -#define _MOUSE_CLEAR { _mouse_buttons = 0; _mouse_abs_x = 0; _mouse_abs_y = 0; } +#define _MOUSE_CLEAR { _mouse_buttons = 0; } static void _kbd_sync_report(bool new); @@ -193,7 +193,7 @@ void ph_usb_send_clear(void) { if (PH_O_IS_MOUSE_USB) { _MOUSE_CLEAR; if (PH_O_IS_MOUSE_USB_ABS) { - _mouse_abs_send_report(0, 0); + _mouse_abs_send_report(_mouse_abs_x, _mouse_abs_y); } else { // PH_O_IS_MOUSE_USB_REL _mouse_rel_send_report(0, 0, 0, 0); } |