Add SDL_LoadSurface and SDL_LoadSurface_IO (#14374)

This commit is contained in:
Maia
2025-11-13 23:50:37 +01:00
committed by GitHub
parent 4cc9153df2
commit a01d6f109d
11 changed files with 122 additions and 23 deletions

View File

@@ -111,7 +111,7 @@ static const char *cross[] = {
static SDL_Surface *load_image_file(const char *file)
{
SDL_Surface *surface = SDL_strstr(file, ".png") ? SDL_LoadPNG(file) : SDL_LoadBMP(file);
SDL_Surface *surface = SDL_LoadSurface(file);
if (surface) {
if (SDL_GetSurfacePalette(surface)) {
const Uint8 bpp = SDL_BITSPERPIXEL(surface->format);