Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Port event.c to SDL3 #3217

Merged
merged 1 commit into from
Nov 19, 2024
Merged

Port event.c to SDL3 #3217

merged 1 commit into from
Nov 19, 2024

Conversation

ankith26
Copy link
Member

@ankith26 ankith26 commented Nov 9, 2024

event.c is now compiling on SDL3.

This PR takes our usual strategy of not changing any SDL2 codepaths, and I have been super conservative with the changes.

The thing that needs discussion here is: how are we going to handle the gesture changes? For now I have just ifdef'd out the gesture parts, but maybe we should consider vendoring in SDL_gesture? Thoughts on this, chat?

@ankith26 ankith26 requested a review from a team as a code owner November 9, 2024 08:11
@ankith26 ankith26 force-pushed the ankith26-more-sdl3-4 branch from 435b8a3 to 4622f42 Compare November 9, 2024 08:22
@bilhox bilhox added event pygame.event sdl3 labels Nov 9, 2024
Copy link
Member

@Starbuck5 Starbuck5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Ankith!

I'm approving this because I think it is safe and ready to merge, but I also have some obvious suggestions you've probably thought about yourself.

It seems like the largest difference by lines is event->key.keysym vs event->key. Maybe there could be a compatibility macro like PG_EV_KEYDATA(event) or something, I believe this would shrink the diff in event.c. I also think the cdevice -> gdevice, ctouchpad -> gtouchpad stuff would be a good opportunity for a compat macro.

Copy link
Member

@zoldalma999 zoldalma999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

@zoldalma999 zoldalma999 merged commit c3bab54 into main Nov 19, 2024
25 checks passed
@zoldalma999 zoldalma999 added this to the 2.5.3 milestone Nov 19, 2024
@ankith26 ankith26 deleted the ankith26-more-sdl3-4 branch November 21, 2024 06:47
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
event pygame.event sdl3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants