diff options
author | kdx <kikoodx@paranoici.org> | 2023-05-11 00:58:42 +0200 |
---|---|---|
committer | kdx <kikoodx@paranoici.org> | 2023-05-11 01:07:06 +0200 |
commit | 378f0a3965c917b0491e2b30938684584bb754f5 (patch) | |
tree | 06ce44e334998d6df5841dfebe5675e025896da4 /sources/TZR_DirectResourceLoad.c | |
parent | 96b15868d306c8b3ded01fad8c37dc964baa767d (diff) | |
download | tzr-378f0a3965c917b0491e2b30938684584bb754f5.tar.gz |
drop sdl image dependency
Diffstat (limited to 'sources/TZR_DirectResourceLoad.c')
-rw-r--r-- | sources/TZR_DirectResourceLoad.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sources/TZR_DirectResourceLoad.c b/sources/TZR_DirectResourceLoad.c index d2ee637..9c7153d 100644 --- a/sources/TZR_DirectResourceLoad.c +++ b/sources/TZR_DirectResourceLoad.c @@ -3,7 +3,6 @@ #include "sdl_error.h" #include <SDL2/SDL_mixer.h> #include <SDL2/SDL_render.h> -#include <SDL2/SDL_image.h> #include <SDL2/SDL_rwops.h> #include <string.h> @@ -24,13 +23,7 @@ TZR_DirectResourceLoad(TZR_Resource *res, const void *data, int size) SDL_RWops *const rw = SDL_RWFromConstMem(data, size); if (rw == NULL) return sdl_error(-1); - SDL_Surface *surf = IMG_Load_RW(rw, 1); - if (surf == NULL) { - SDL_RWops *const rw = SDL_RWFromConstMem(data, size); - if (rw == NULL) - return sdl_error(-1); - surf = SDL_LoadBMP_RW(rw, 1); - } + SDL_Surface *const surf = SDL_LoadBMP_RW(rw, 1); if (surf == NULL) return sdl_error(-1); SDL_Texture *const tex = |