diff options
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 = |