src/video/SDL_stretch.c
changeset 7208 414ad123be9b
parent 7037 3fedf1f25b94
child 7209 805754c011a1
     1.1 --- a/src/video/SDL_stretch.c	Tue May 21 23:35:45 2013 -0400
     1.2 +++ b/src/video/SDL_stretch.c	Tue May 21 22:01:18 2013 -0700
     1.3 @@ -54,12 +54,12 @@
     1.4  #endif
     1.5  
     1.6  #if defined(_M_IX86) || defined(i386)
     1.7 -#define PREFIX16	0x66
     1.8 -#define STORE_BYTE	0xAA
     1.9 -#define STORE_WORD	0xAB
    1.10 -#define LOAD_BYTE	0xAC
    1.11 -#define LOAD_WORD	0xAD
    1.12 -#define RETURN		0xC3
    1.13 +#define PREFIX16    0x66
    1.14 +#define STORE_BYTE  0xAA
    1.15 +#define STORE_WORD  0xAB
    1.16 +#define LOAD_BYTE   0xAC
    1.17 +#define LOAD_WORD   0xAD
    1.18 +#define RETURN      0xC3
    1.19  #else
    1.20  #error Need assembly opcodes for this architecture
    1.21  #endif
    1.22 @@ -148,23 +148,23 @@
    1.23  
    1.24  #endif /* USE_ASM_STRETCH */
    1.25  
    1.26 -#define DEFINE_COPY_ROW(name, type)			\
    1.27 -static void name(type *src, int src_w, type *dst, int dst_w)	\
    1.28 -{							\
    1.29 -	int i;						\
    1.30 -	int pos, inc;					\
    1.31 -	type pixel = 0;					\
    1.32 -							\
    1.33 -	pos = 0x10000;					\
    1.34 -	inc = (src_w << 16) / dst_w;			\
    1.35 -	for ( i=dst_w; i>0; --i ) {			\
    1.36 -		while ( pos >= 0x10000L ) {		\
    1.37 -			pixel = *src++;			\
    1.38 -			pos -= 0x10000L;		\
    1.39 -		}					\
    1.40 -		*dst++ = pixel;				\
    1.41 -		pos += inc;				\
    1.42 -	}						\
    1.43 +#define DEFINE_COPY_ROW(name, type)         \
    1.44 +static void name(type *src, int src_w, type *dst, int dst_w)    \
    1.45 +{                           \
    1.46 +    int i;                      \
    1.47 +    int pos, inc;                   \
    1.48 +    type pixel = 0;                 \
    1.49 +                            \
    1.50 +    pos = 0x10000;                  \
    1.51 +    inc = (src_w << 16) / dst_w;            \
    1.52 +    for ( i=dst_w; i>0; --i ) {         \
    1.53 +        while ( pos >= 0x10000L ) {     \
    1.54 +            pixel = *src++;         \
    1.55 +            pos -= 0x10000L;        \
    1.56 +        }                   \
    1.57 +        *dst++ = pixel;             \
    1.58 +        pos += inc;             \
    1.59 +    }                       \
    1.60  }
    1.61  /* *INDENT-OFF* */
    1.62  DEFINE_COPY_ROW(copy_row1, Uint8)
    1.63 @@ -220,7 +220,7 @@
    1.64  #endif /* USE_ASM_STRETCH */
    1.65      const int bpp = dst->format->BytesPerPixel;
    1.66  
    1.67 -    if (src->format->BitsPerPixel != dst->format->BitsPerPixel) {
    1.68 +    if (src->format->format != dst->format->format) {
    1.69          return SDL_SetError("Only works with same format surfaces");
    1.70      }
    1.71