*** empty log message ***
authorSam Lantinga <slouken@libsdl.org>
Mon, 14 Jan 2002 19:20:39 +0000
changeset 264 c9cd3b564e4b
parent 263 63e391bd7085
child 265 35d9c8a5aa10
*** empty log message ***
src/video/SDL_surface.c
--- a/src/video/SDL_surface.c	Thu Jan 10 02:00:29 2002 +0000
+++ b/src/video/SDL_surface.c	Mon Jan 14 19:20:39 2002 +0000
@@ -711,6 +711,14 @@
 		}
 	}
 
+	/* Only create hw surfaces with alpha channel if hw alpha blits
+	   are supported */
+	if(format->Amask != 0 && (flags & SDL_HWSURFACE)) {
+		const SDL_VideoInfo *vi = SDL_GetVideoInfo();
+		if(!vi || !vi->blit_hw_A)
+			flags &= ~SDL_HWSURFACE;
+	}
+
 	/* Create a new surface with the desired format */
 	convert = SDL_CreateRGBSurface(flags,
 				surface->w, surface->h, format->BitsPerPixel,