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

Use macros for (Bytes|Bits)PerPixel compat in SDL3 #2804

Merged

Conversation

Starbuck5
Copy link
Member

@Starbuck5 Starbuck5 commented Apr 14, 2024

This doesn't fix every read/write of these struct members, but it gets 99% of them. And this is hard to test (SDL3wise) without everything else compiling on SDL3, which it doesn't without a lot more patches.

For SDL2, this doesn't change how it compiles at all.

@Starbuck5 Starbuck5 added Code quality/robustness Code quality and resilience to changes sdl3 labels Apr 14, 2024
@Starbuck5 Starbuck5 requested a review from a team as a code owner April 14, 2024 09:07
@Starbuck5 Starbuck5 marked this pull request as draft April 14, 2024 09:11
@Starbuck5 Starbuck5 removed the Code quality/robustness Code quality and resilience to changes label Apr 14, 2024
This doesn't fix every read/write of these struct members, but it gets 99% of them. And this is hard to test (SDL3-wise) without everything else compiling on SDL3, which it doesn't without a lot more patches.
@Starbuck5 Starbuck5 force-pushed the prep-BitsBytesPerPixel-changes-sdl3 branch from 9eb7813 to 4230f16 Compare April 14, 2024 20:57
Copy link
Member Author

Choose a reason for hiding this comment

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

Had to use a different strategy here because this file doesn't include _pygame.h, and I didn't want to try to edit it so it did.

@Starbuck5 Starbuck5 marked this pull request as ready for review April 14, 2024 21:10
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, thankies 👍

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 7057f16 into pygame-community:main Apr 21, 2024
36 checks passed
@ankith26 ankith26 added this to the 2.5.0 milestone Apr 21, 2024
@Starbuck5 Starbuck5 deleted the prep-BitsBytesPerPixel-changes-sdl3 branch June 12, 2024 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants