wayland: Fixed pen button input (was losing button up events).

This commit is contained in:
Ryan C. Gordon
2025-11-19 14:01:53 -05:00
parent be15de6baa
commit 0cc3354731

View File

@@ -3408,7 +3408,7 @@ static void tablet_tool_handle_button(void *data, struct zwp_tablet_tool_v2 *too
}
SDL_assert((sdlbutton >= 1) && (sdlbutton <= SDL_arraysize(sdltool->frame.buttons)));
sdltool->frame.buttons[sdlbutton-1] = (state == ZWP_TABLET_PAD_V2_BUTTON_STATE_PRESSED) ? 1 : 0;
sdltool->frame.buttons[sdlbutton-1] = (state == ZWP_TABLET_PAD_V2_BUTTON_STATE_PRESSED) ? WAYLAND_TABLET_TOOL_BUTTON_DOWN : WAYLAND_TABLET_TOOL_BUTTON_UP;
}
static void tablet_tool_handle_rotation(void *data, struct zwp_tablet_tool_v2 *tool, wl_fixed_t degrees)