mirror of
https://github.com/Genymobile/scrcpy
synced 2025-09-04 00:05:15 +00:00
Fix HID mouse support with SDL precise scrolling
Over HID, only integral scroll values can be sent. When SDL precise scrolling is active, scroll events may include fractional values (e.g., 0.05), which are truncated to 0 in the HID event. To fix the problem, use the integral scroll value reported by SDL, which internally accumulates fractional deltas. Fixes #6156 <https://github.com/Genymobile/scrcpy/issues/6156> PR #6172 <https://github.com/Genymobile/scrcpy/pull/6172>
This commit is contained in:
@@ -903,6 +903,8 @@ sc_input_manager_process_mouse_wheel(struct sc_input_manager *im,
|
||||
.hscroll = event->x,
|
||||
.vscroll = event->y,
|
||||
#endif
|
||||
.hscroll_int = event->x,
|
||||
.vscroll_int = event->y,
|
||||
.buttons_state = im->mouse_buttons_state,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user