Commit 7f5339e6c4dad8c99a3a8af4fd0c843c5b39caca

Alex Szpakowski 2021-12-14T14:24:59

Document the packed integer formats SDL_Color is bit-compatible with.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/include/SDL_pixels.h b/include/SDL_pixels.h
index fcfd649..5f859fe 100644
--- a/include/SDL_pixels.h
+++ b/include/SDL_pixels.h
@@ -301,6 +301,11 @@ typedef enum
         SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ')
 } SDL_PixelFormatEnum;
 
+/**
+ * The bits of this structure can be directly reinterpreted as an integer-packed
+ * color which uses the SDL_PIXELFORMAT_RGBA32 format (SDL_PIXELFORMAT_ABGR8888
+ * on little-endian systems and SDL_PIXELFORMAT_RGBA8888 on big-endian systems).
+ */
 typedef struct SDL_Color
 {
     Uint8 r;