David Gow 1857f57686 Remove incorrect asserts from SDL_InitPixelFormatDetails()
The SDL_Surface rework in #10201 adds some extra checks that the pixel
format enum matches the SDL_PixelFormatDetails struct, which is largely
filled in with values from SDL_GetMasksForPixelFormat().

However, there are a few cases where these do not match:
- Indexed 1-, 2-, and 4-bit formats encode a bytes_per_pixel of 0, but
  SDL_GetMasksForPixelFormat() gives a value of 1.
- Packed formats, like SDL_PIXELFORMAT_XRGB8888 encode a bits_per_pixel
  of the number of used bits (24), but SDL_GetMasksForPixelFormat()
  includes the padding byte, giving a total of 32.

We could change the encoding of these in the enum, or change what we store
in the details struct to match, but I suspect we'd either break something
that relies on it, or lose some (_maybe_ useful) information. In the meantime,
this gets the tests working again.

Signed-off-by: David Gow <david@ingeniumdigital.com>
2024-07-10 09:26:46 -07:00
2024-07-10 00:48:18 -07:00
2024-07-10 00:48:18 -07:00
2024-07-10 00:48:18 -07:00
2024-07-10 07:48:48 +00:00
2024-07-10 00:48:18 -07:00
2024-07-10 00:48:18 -07:00
2024-07-10 00:48:18 -07:00
2024-07-10 00:48:18 -07:00
2024-04-10 09:18:42 -04:00
2024-01-01 13:15:26 -08:00

Simple DirectMedia Layer (SDL) Version 3.0

https://www.libsdl.org/

Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games.

More extensive documentation is available in the docs directory, starting with README.md. If you are migrating to SDL 3.0 from SDL 2.0, the changes are extensively documented in README-migration.md.

Enjoy!

Sam Lantinga (slouken@libsdl.org)

Description
Simple Directmedia Layer
Readme 175 MiB
Languages
C 86.4%
C++ 5.9%
Objective-C 3.4%
CMake 1.6%
Perl 0.8%
Other 1.7%