changeset 264:c9cd3b564e4b

*** empty log message ***
author Sam Lantinga <slouken@libsdl.org>
date Mon, 14 Jan 2002 19:20:39 +0000
parents 63e391bd7085
children 35d9c8a5aa10
files src/video/SDL_surface.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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,