Fix an inverted condition in Wayland pen tip handling

This commit is contained in:
hwsmm
2025-12-04 22:47:53 +09:00
committed by Sam Lantinga
parent c61497b744
commit 3b12019892

View File

@@ -3458,7 +3458,7 @@ static void tablet_tool_handle_frame(void *data, struct zwp_tablet_tool_v2 *tool
// I don't know if this is necessary (or makes sense), but send motion before pen downs, but after pen ups, so you don't get unexpected lines drawn.
if (sdltool->frame.have_motion && sdltool->frame.tool_state) {
if (sdltool->frame.tool_state == WAYLAND_TABLET_TOOL_STATE_UP) {
if (sdltool->frame.tool_state == WAYLAND_TABLET_TOOL_STATE_DOWN) {
SDL_SendPenMotion(timestamp, instance_id, window, sdltool->frame.x, sdltool->frame.y);
SDL_SendPenTouch(timestamp, instance_id, window, false, true); // !!! FIXME: how do we know what tip is in use?
} else {