comparison src/libmlk-core/core/texture.c @ 430:1645433e008d

core: rename ERR_INTERNAL to ERR_SDL
author David Demelier <markand@malikania.fr>
date Sat, 15 Oct 2022 17:18:45 +0200
parents 63ebfa352ae1
children
comparison
equal deleted inserted replaced
429:67b52de5d3c0 430:1645433e008d
37 tex->handle = SDL_CreateTexture(RENDERER(), 37 tex->handle = SDL_CreateTexture(RENDERER(),
38 SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, w, h); 38 SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, w, h);
39 39
40 if (!tex->handle) { 40 if (!tex->handle) {
41 tex->w = tex->h = 0; 41 tex->w = tex->h = 0;
42 return ERR_INTERNAL; 42 return ERR_SDL;
43 } 43 }
44 44
45 tex->w = w; 45 tex->w = w;
46 tex->h = h; 46 tex->h = h;
47 47
164 assert(tex); 164 assert(tex);
165 assert(surface); 165 assert(surface);
166 166
167 if (!(tex->handle = SDL_CreateTextureFromSurface(RENDERER(), surface))) { 167 if (!(tex->handle = SDL_CreateTextureFromSurface(RENDERER(), surface))) {
168 tex->w = tex->h = 0; 168 tex->w = tex->h = 0;
169 return ERR_INTERNAL; 169 return ERR_SDL;
170 } 170 }
171 171
172 tex->w = surface->w; 172 tex->w = surface->w;
173 tex->h = surface->h; 173 tex->h = surface->h;
174 174