wayland: Pass the inverted flag for horizontal scroll events

Natural scrolling affects both axes, and the compositor may not send the vertical axis orientation if the frame has no vertical scroll motion, so purely horizontal events need to be flagged as inverted as well.

(cherry picked from commit 3ee0439ae5)
This commit is contained in:
Frank Praznik
2026-05-03 17:31:37 -04:00
parent ab01c9f92a
commit b35ffa1f69

View File

@@ -899,9 +899,7 @@ static void pointer_handle_axis_relative_direction(void *data, struct wl_pointer
uint32_t axis, uint32_t axis_relative_direction)
{
struct SDL_WaylandInput *input = data;
if (axis != WL_POINTER_AXIS_VERTICAL_SCROLL) {
return;
}
switch (axis_relative_direction) {
case WL_POINTER_AXIS_RELATIVE_DIRECTION_IDENTICAL:
input->pointer_curr_axis_info.direction = SDL_MOUSEWHEEL_NORMAL;