Switch pixel format loss fields to number of bits

This makes more sense and handles pixel formats with > 8 bits per channel

Fixes https://github.com/libsdl-org/SDL/issues/10168
This commit is contained in:
Sam Lantinga 2024-07-06 07:34:49 -07:00
parent 9389712917
commit 3c90b1c1f6
9 changed files with 88 additions and 76 deletions

View file

@ -751,10 +751,10 @@ typedef struct SDL_PixelFormat
Uint32 Gmask;
Uint32 Bmask;
Uint32 Amask;
Uint8 Rloss;
Uint8 Gloss;
Uint8 Bloss;
Uint8 Aloss;
Uint8 Rbits;
Uint8 Gbits;
Uint8 Bbits;
Uint8 Abits;
Uint8 Rshift;
Uint8 Gshift;
Uint8 Bshift;