diff options
author | Sam Lantinga <slouken@libsdl.org> | 2016-10-11 23:19:05 -0700 |
---|---|---|
committer | Sam Lantinga <slouken@libsdl.org> | 2016-10-11 23:19:05 -0700 |
commit | cac17821d9944d0411a3de4e9188f397353f67ba (patch) | |
tree | 8046080ab92c7d22549465c05b2623a6479bbccd /src/render/software/SDL_rotate.c | |
parent | 48aafff08819fd2d5d290466a017c952625cb646 (diff) |
Fixed bug 2923 - Add SDL_PIXELFORMAT_RGBA32 for byte-wise 32bit RGBA data
Daniel Gibson
Ok, I followed the simple approach of just making SDL_PIXELFORMAT_RGBA32 an alias of SDL_PIXELFORMAT_RGBA8888/SDL_PIXELFORMAT_ABGR8888, depending on endianess. And I did the same for SDL_PIXELFORMAT_ARGB32, .._BGRA, .._ABGR.
SDL_GetPixelFormatName() will of course return SDL_PIXELFORMAT_RGBA8888 (or SDL_PIXELFORMAT_ABGR8888) instead of SDL_PIXELFORMAT_RGBA32, but as long as that's mentioned in the docs it shouldn't be a problem.
Diffstat (limited to 'src/render/software/SDL_rotate.c')
-rw-r--r-- | src/render/software/SDL_rotate.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/render/software/SDL_rotate.c b/src/render/software/SDL_rotate.c index b93454d41e..0141d174d9 100644 --- a/src/render/software/SDL_rotate.c +++ b/src/render/software/SDL_rotate.c @@ -444,14 +444,7 @@ SDLgfx_rotateSurface(SDL_Surface * src, double angle, int centerx, int centery, */ rz_src = src; } else { - Uint32 format = SDL_MasksToPixelFormatEnum(32, -#if SDL_BYTEORDER == SDL_LIL_ENDIAN - 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000 -#else - 0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff -#endif - ); - rz_src = SDL_ConvertSurfaceFormat(src, format, src->flags); + rz_src = SDL_ConvertSurfaceFormat(src, SDL_PIXELFORMAT_ARGB32, src->flags); if (rz_src == NULL) { return NULL; } |