Skip to content

Commit

Permalink
Handle SDL_SIMD_ALIGNED even if the headers don't.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Mar 6, 2019
1 parent 5ee36c8 commit e17ff23
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/SDL12_compat.c
Expand Up @@ -144,6 +144,11 @@
#define SDL12_LOGPAL 1
#define SDL12_PHYSPAL 2

// this will be in SDL 2.0.10, but here it is in case your headers are missing it.
#ifndef SDL_SIMD_ALIGNED
#define SDL_SIMD_ALIGNED 0x00000008
#endif

typedef struct SDL12_Rect
{
Sint16 x;
Expand Down Expand Up @@ -2107,9 +2112,7 @@ Surface20to12(SDL_Surface *surface20)

SDL20_zerop(surface12);
flags = surface20->flags;
#ifdef SDL_SIMD_ALIGNED
flags &= ~SDL_SIMD_ALIGNED; /* we don't need to map this to 1.2 */
#endif
#define MAPSURFACEFLAGS(fl) { if (surface20->flags & SDL_##fl) { surface12->flags |= SDL12_##fl; flags &= ~SDL_##fl; } }
MAPSURFACEFLAGS(PREALLOC);
MAPSURFACEFLAGS(RLEACCEL);
Expand Down

0 comments on commit e17ff23

Please sign in to comment.