Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Introduce PG_SURF_FORMATENUM macro (SDL3 compat) #3294

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

Starbuck5
Copy link
Member

  • Brings SDL3 just a bit closer. Rotozoom.c for example now compiles, previously did not.
  • Simplify 2 pixel format checks (in mask and transform)
  • Remove unneeded include from transform.c (SDL_cpuinfo.h comes in fine from SDL.h, and fails to include on SDL3)

This macro is the same as PG_SurfaceFormatEnum from gresm's surface PR #3215, but named as a macro and applied throughout the project. Except for window.c, because I didn't want to cause a merge conflict with Ankith's window SDL3 PR.

- Brings SDL3 just a bit closer. Rotozoom.c for example now compiles, previously did not.
- Simplify 2 pixel format checks
- Remove unneeded include from transform.c
@Starbuck5 Starbuck5 added Code quality/robustness Code quality and resilience to changes sdl3 labels Jan 17, 2025
@Starbuck5 Starbuck5 requested a review from a team as a code owner January 17, 2025 08:03
Copy link
Member

@ankith26 ankith26 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the PR 🎉

PS: you can apply the macro on window as well, I don't mind dealing with the conflict. I will revive that PR after this one merges.

Copy link
Member

@MyreMylar MyreMylar left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@MyreMylar MyreMylar merged commit 28f5a32 into pygame-community:main Jan 17, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code quality/robustness Code quality and resilience to changes sdl3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants