Handle SDL_SIMD_ALIGNED even if the headers don't.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 06 Mar 2019 16:51:58 -0500
changeset 104f3976d9769ab
parent 103 685c0014eda1
child 105 5eca9fdcac0c
Handle SDL_SIMD_ALIGNED even if the headers don't.
src/SDL12_compat.c
     1.1 --- a/src/SDL12_compat.c	Wed Mar 06 03:08:45 2019 -0500
     1.2 +++ b/src/SDL12_compat.c	Wed Mar 06 16:51:58 2019 -0500
     1.3 @@ -144,6 +144,11 @@
     1.4  #define SDL12_LOGPAL 1
     1.5  #define SDL12_PHYSPAL 2
     1.6  
     1.7 +// this will be in SDL 2.0.10, but here it is in case your headers are missing it.
     1.8 +#ifndef SDL_SIMD_ALIGNED
     1.9 +#define SDL_SIMD_ALIGNED    0x00000008
    1.10 +#endif
    1.11 +
    1.12  typedef struct SDL12_Rect
    1.13  {
    1.14      Sint16 x;
    1.15 @@ -2107,9 +2112,7 @@
    1.16  
    1.17      SDL20_zerop(surface12);
    1.18      flags = surface20->flags;
    1.19 -    #ifdef SDL_SIMD_ALIGNED
    1.20      flags &= ~SDL_SIMD_ALIGNED;  /* we don't need to map this to 1.2 */
    1.21 -    #endif
    1.22      #define MAPSURFACEFLAGS(fl) { if (surface20->flags & SDL_##fl) { surface12->flags |= SDL12_##fl; flags &= ~SDL_##fl; } }
    1.23      MAPSURFACEFLAGS(PREALLOC);
    1.24      MAPSURFACEFLAGS(RLEACCEL);