src/video/SDL_blit_A.c
changeset 1240 3b8a43c428bb
parent 1175 867f521591e5
child 1312 c9b51268668f
--- a/src/video/SDL_blit_A.c	Sun Jan 08 17:29:19 2006 +0000
+++ b/src/video/SDL_blit_A.c	Sun Jan 08 21:18:15 2006 +0000
@@ -2145,7 +2145,8 @@
 		return BlitNto1SurfaceAlphaKey;
 	    else
 #ifdef USE_ALTIVEC_BLITTERS
-        if (sf->BytesPerPixel == 4 && df->BytesPerPixel == 4 && SDL_HasAltiVec())
+	if (sf->BytesPerPixel == 4 && df->BytesPerPixel == 4 &&
+	    !(surface->map->dst->flags & SDL_HWSURFACE) && SDL_HasAltiVec())
             return Blit32to32SurfaceAlphaKeyAltivec;
         else
 #endif
@@ -2192,7 +2193,7 @@
 		else
 #endif
 #ifdef USE_ALTIVEC_BLITTERS
-        if(SDL_HasAltiVec())
+	if(!(surface->map->dst->flags & SDL_HWSURFACE) && SDL_HasAltiVec())
             return BlitRGBtoRGBSurfaceAlphaAltivec;
         else
 #endif
@@ -2200,7 +2201,8 @@
 		}
 		else
 #ifdef USE_ALTIVEC_BLITTERS
-        if((sf->BytesPerPixel == 4) && SDL_HasAltiVec())
+        if((sf->BytesPerPixel == 4) &&
+	   !(surface->map->dst->flags & SDL_HWSURFACE) && SDL_HasAltiVec())
             return Blit32to32SurfaceAlphaAltivec;
         else
 #endif
@@ -2219,9 +2221,9 @@
 
 	case 2:
 #ifdef USE_ALTIVEC_BLITTERS
-        if(sf->BytesPerPixel == 4 && 
+	if(sf->BytesPerPixel == 4 && !(surface->map->dst->flags & SDL_HWSURFACE) &&
            df->Gmask == 0x7e0 &&
-           df->Bmask == 0x1f)
+	   df->Bmask == 0x1f && SDL_HasAltiVec())
             return Blit32to565PixelAlphaAltivec;
         else
 #endif
@@ -2252,14 +2254,15 @@
 		else
 #endif
 #ifdef USE_ALTIVEC_BLITTERS
-        if(SDL_HasAltiVec())
+	if(!(surface->map->dst->flags & SDL_HWSURFACE) && SDL_HasAltiVec())
             return BlitRGBtoRGBPixelAlphaAltivec;
         else
 #endif
 		    return BlitRGBtoRGBPixelAlpha;
 	    }
 #ifdef USE_ALTIVEC_BLITTERS
-        if (sf->Amask && sf->BytesPerPixel == 4 && SDL_HasAltiVec())
+        if (sf->Amask && sf->BytesPerPixel == 4 &&
+	    !(surface->map->dst->flags & SDL_HWSURFACE) && SDL_HasAltiVec())
             return Blit32to32PixelAlphaAltivec;
         else
 #endif