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

Adjust pg_MappedColorFromObj API for SDL3-porting #3160

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

Starbuck5
Copy link
Member

This PR gets the color module compiling in SDL3.

Why so many files changed? The one problem in Color was with a C-API function, so I needed to adjust all the callers of the function.

In SDL3, surf->format is not a good enough source of information about the surface to do things like MapRGB, because it doesn't have palette information. Therefore I think it makes sense to pass around surfaces instead of SDL_PixelFormats.

In SDL3, surf->format is not a good enough source of information about the surface to do things like MapRGB, because it doesn't have palette information. Therefore I think it makes sense to pass around surfaces instead of SDL_PixelFormats.

This commit gets the color module compiling in SDL3.
@Starbuck5 Starbuck5 added color pygame.color sdl3 labels Oct 10, 2024
@Starbuck5 Starbuck5 requested a review from a team as a code owner October 10, 2024 01:49
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 🎉

Copy link
Contributor

@damusss damusss left a comment

Choose a reason for hiding this comment

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

Alright, I agree. LGTM 😄

@damusss damusss added this to the 2.5.2 milestone Oct 10, 2024
@damusss damusss merged commit 23bbb3b into pygame-community:main Oct 10, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
color pygame.color sdl3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants