We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 192743d commit 5f4f8f8Copy full SHA for 5f4f8f8
src_c/_pygame.h
@@ -130,6 +130,8 @@ PG_GetSurfaceFormat(SDL_Surface *surf)
130
return SDL_GetPixelFormatDetails(surf->format);
131
}
132
133
+#define PG_GetSurfacePalette SDL_GetSurfacePalette
134
+
135
#define PG_GetRGBA SDL_GetRGBA
136
#define PG_GetRGB SDL_GetRGB
137
#define PG_MapRGBA SDL_MapRGBA
@@ -225,6 +227,12 @@ PG_GetSurfaceFormat(SDL_Surface *surf)
225
227
return surf->format;
226
228
229
230
+static inline SDL_Palette *
231
+PG_GetSurfacePalette(SDL_Surface *surf)
232
+{
233
+ return surf->format->palette;
234
+}
235
236
// NOTE:
237
// palette is part of the format in SDL2, so these functions below have it
238
// as a separate parameter to be consistent with the SDL3 signature.
0 commit comments