SDL_stretch.c: backported fix for bug #3808 SDL-1.2
authorOzkan Sezer <sezeroz@gmail.com>
Sat, 24 Mar 2018 22:36:38 +0300
branchSDL-1.2
changeset 119704b06648ea2d9
parent 11969 55313dbda97e
child 11971 70dd6a38cd76
SDL_stretch.c: backported fix for bug #3808
src/video/SDL_stretch.c
     1.1 --- a/src/video/SDL_stretch.c	Sat Mar 24 22:34:42 2018 +0300
     1.2 +++ b/src/video/SDL_stretch.c	Sat Mar 24 22:36:38 2018 +0300
     1.3 @@ -34,8 +34,8 @@
     1.4     into the general blitting mechanism.
     1.5  */
     1.6  
     1.7 -#if ((defined(_MFC_VER) && defined(_M_IX86)/* && !defined(_WIN32_WCE) still needed? */) || \
     1.8 -     defined(__WATCOMC__) || \
     1.9 +#if ((defined(_MSC_VER) && defined(_M_IX86)) || \
    1.10 +     (defined(__WATCOMC__) && defined(__386__)) || \
    1.11       (defined(__GNUC__) && defined(__i386__))) && SDL_ASSEMBLY_ROUTINES
    1.12  /* There's a bug with gcc 4.4.1 and -O2 where srcp doesn't get the correct
    1.13   * value after the first scanline.  FIXME? */
    1.14 @@ -54,7 +54,7 @@
    1.15  #define PAGE_ALIGNED
    1.16  #endif
    1.17  
    1.18 -#if defined(_M_IX86) || defined(i386)
    1.19 +#if defined(_M_IX86) || defined(__i386__) || defined(__386__)
    1.20  #define PREFIX16	0x66
    1.21  #define STORE_BYTE	0xAA
    1.22  #define STORE_WORD	0xAB
    1.23 @@ -116,7 +116,7 @@
    1.24  	inc = (src_w << 16) / dst_w;
    1.25  	eip = copy_row;
    1.26  	fence = copy_row+sizeof(copy_row)-2;
    1.27 -	for ( i=0; i<dst_w && eip < end; ++i ) {
    1.28 +	for ( i=0; i<dst_w; ++i ) {
    1.29  		while ( pos >= 0x10000L ) {
    1.30  			if ( eip == fence ) {
    1.31  				return -1;