Skip to content

Conversation

@bubbleguuum
Copy link
Contributor

@bubbleguuum bubbleguuum commented Jan 6, 2026

Older versions of XInput2 do not declare struct XIGesturePinchEvent in XInput2.h (nor anywhere else), causing compilation failure in SDL_x11xinput2.c.

Check for XIGesturePinchEvent in the test for enabling SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_GESTURE

Older versions of XInput2 do not declare struct XIGesturePinchEvent
in XInput2.h, causing compilation failure in SDL_x11xinput2.c

Check for XIGesturePinchEvent in the test for enabling
SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_GESTURE
@bubbleguuum
Copy link
Contributor Author

This is the compilation failure fixed by this PR, compiling SDL 3.4.0 on an older distro (openSUSE LEAP 15.5):

[   29s] /home/abuild/rpmbuild/BUILD/SDL3-3.4.0/src/video/x11/SDL_x11xinput2.c: In function 'X11_HandleXinput2Event':
[   29s] /home/abuild/rpmbuild/BUILD/SDL3-3.4.0/src/video/x11/SDL_x11xinput2.c:732:15: error: unknown type name 'XIGesturePinchEvent'
[   29s]          const XIGesturePinchEvent *xev = (const XIGesturePinchEvent *)cookie->data;
[   29s]                ^~~~~~~~~~~~~~~~~~~
[   29s] /home/abuild/rpmbuild/BUILD/SDL3-3.4.0/src/video/x11/SDL_x11xinput2.c:732:49: error: unknown type name 'XIGesturePinchEvent'
[   29s]          const XIGesturePinchEvent *xev = (const XIGesturePinchEvent *)cookie->data;
[   29s]                                                  ^~~~~~~~~~~~~~~~~~~

@slouken slouken merged commit 7690e00 into libsdl-org:main Jan 6, 2026
43 of 45 checks passed
@slouken slouken added this to the 3.4.2 milestone Jan 6, 2026
@slouken
Copy link
Collaborator

slouken commented Jan 6, 2026

Merged, thanks!

@bubbleguuum bubbleguuum deleted the fix-xinput2-pinch-compilation branch January 6, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants