Skip to content

Commit

Permalink
Merge pull request #3166 from Starbuck5/image-sdl3
Browse files Browse the repository at this point in the history
Image module SDL3 support
  • Loading branch information
ankith26 authored Oct 18, 2024
2 parents 5af69f9 + a20c77e commit a5002cf
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 88 deletions.
6 changes: 3 additions & 3 deletions src_c/_pygame.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ PG_UnlockMutex(SDL_mutex *mutex)
return 0;
}

#define PG_SURF_BitsPerPixel(surf) surf->format->bits_per_pixel
#define PG_SURF_BytesPerPixel(surf) surf->format->bytes_per_pixel
#define PG_SURF_BitsPerPixel(surf) SDL_BITSPERPIXEL(surf->format)
#define PG_SURF_BytesPerPixel(surf) SDL_BYTESPERPIXEL(surf->format)
#define PG_FORMAT_BitsPerPixel(format) format->bits_per_pixel
#define PG_FORMAT_BytesPerPixel(format) format->bytes_per_pixel

Expand Down Expand Up @@ -138,7 +138,7 @@ PG_UnlockMutex(SDL_mutex *mutex)

#define PG_CreateSurface(width, height, format) \
SDL_CreateRGBSurfaceWithFormat(0, width, height, 0, format)
#define PG_CreateSurfaceFrom(pixels, width, height, pitch, format) \
#define PG_CreateSurfaceFrom(width, height, format, pixels, pitch) \
SDL_CreateRGBSurfaceWithFormatFrom(pixels, width, height, 0, pitch, format)
#define PG_ConvertSurface(src, fmt) SDL_ConvertSurface(src, fmt, 0)
#define PG_ConvertSurfaceFormat(src, pixel_format) \
Expand Down
Loading

0 comments on commit a5002cf

Please sign in to comment.