Mercurial > molko
diff libmlk-core/mlk/core/texture.c @ 547:c7664b679a95
misc: remove error codes for now
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 06 Mar 2023 20:03:00 +0100 |
parents | 80242343d152 |
children | 76ce31b0151f |
line wrap: on
line diff
--- a/libmlk-core/mlk/core/texture.c Mon Mar 06 20:01:00 2023 +0100 +++ b/libmlk-core/mlk/core/texture.c Mon Mar 06 20:03:00 2023 +0100 @@ -38,7 +38,7 @@ if (!tex->handle) { tex->w = tex->h = 0; - return MLK_ERR_SDL; + return mlk_errf("%s", SDL_GetError()); } tex->w = w; @@ -67,7 +67,7 @@ }; if (SDL_SetTextureBlendMode(tex->handle, table[blend]) < 0) - return MLK_ERR_SDL; + return mlk_errf("%s", SDL_GetError()); return 0; } @@ -79,7 +79,7 @@ assert(alpha <= 255); if (SDL_SetTextureAlphaMod(tex->handle, alpha) < 0) - return MLK_ERR_SDL; + return mlk_errf("%s", SDL_GetError()); return 0; } @@ -90,7 +90,7 @@ assert(mlk_texture_ok(tex)); if (SDL_SetTextureColorMod(tex->handle, MLK_COLOR_R(color), MLK_COLOR_G(color), MLK_COLOR_B(color)) < 0) - return MLK_ERR_SDL; + return mlk_errf("%s", SDL_GetError()); return 0; } @@ -108,7 +108,7 @@ }; if (SDL_RenderCopy(MLK__RENDERER(), tex->handle, NULL, &dst) < 0) - return MLK_ERR_SDL; + return mlk_errf("%s", SDL_GetError()); return 0; } @@ -139,7 +139,7 @@ }; if (SDL_RenderCopyEx(MLK__RENDERER(), tex->handle, &src, &dst, angle, NULL, SDL_FLIP_NONE) < 0) - return MLK_ERR_SDL; + return mlk_errf("%s", SDL_GetError()); return 0; } @@ -165,7 +165,7 @@ if (!(tex->handle = SDL_CreateTextureFromSurface(MLK__RENDERER(), surface))) { tex->w = tex->h = 0; - return MLK_ERR_SDL; + return mlk_errf("%s", SDL_GetError()); } tex->w = surface->w;