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

More SDL3 compat: Surface things #2922

Merged

Conversation

Starbuck5
Copy link
Member

@Starbuck5 Starbuck5 commented Jun 12, 2024

Adds surface BPP macros to new code that slipped around #2804

Makes PG_SurfaceHasRLE work everywhere, not just in rotozoom, and uses it to replace a nearly identical hack in surface.c, but with a strategy that instead calls an SDL function in SDL 2.0.14 and above (which works in SDL3, where the original hack doesn't).

@Starbuck5 Starbuck5 requested a review from a team as a code owner June 12, 2024 06:29
@Starbuck5 Starbuck5 marked this pull request as draft June 12, 2024 06:30
@Starbuck5 Starbuck5 force-pushed the surface-stuff-sdl3-compat branch from 6b93b11 to fd72ed7 Compare June 12, 2024 06:33
@Starbuck5 Starbuck5 added the sdl3 label Jun 12, 2024
@Starbuck5 Starbuck5 force-pushed the surface-stuff-sdl3-compat branch from b80e772 to 037fd25 Compare June 12, 2024 07:17
@Starbuck5 Starbuck5 linked an issue Jun 12, 2024 that may be closed by this pull request
@Starbuck5 Starbuck5 marked this pull request as ready for review June 12, 2024 07:33
src_c/_pygame.h Outdated Show resolved Hide resolved
Co-Authored-By: Ankith <itsankith26@gmail.com>
@Starbuck5 Starbuck5 force-pushed the surface-stuff-sdl3-compat branch from 7b149c5 to 54b73a7 Compare June 13, 2024 07:44
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 👍

@zoldalma999 zoldalma999 merged commit 14908e1 into pygame-community:main Jun 14, 2024
39 checks passed
@ankith26 ankith26 added this to the 2.5.1 milestone Jun 15, 2024
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.

Replace old hack with SDL_HasSurfaceRLE
3 participants