mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
Add SDL_LoadSurface and SDL_LoadSurface_IO (#14374)
This commit is contained in:
parent
4cc9153df2
commit
a01d6f109d
11 changed files with 122 additions and 23 deletions
|
|
@ -84,7 +84,7 @@ SDL_Texture *LoadTexture(SDL_Renderer *renderer, const char *file, bool transpar
|
|||
file = path;
|
||||
}
|
||||
|
||||
temp = SDL_strstr(file, ".png") ? SDL_LoadPNG(file) : SDL_LoadBMP(file);
|
||||
temp = SDL_LoadSurface(file);
|
||||
if (!temp) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s", file, SDL_GetError());
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue