diff src/video/SDL_surface.c @ 264:c9cd3b564e4b

*** empty log message ***
author Sam Lantinga <slouken@libsdl.org>
date Mon, 14 Jan 2002 19:20:39 +0000
parents e8157fcb3114
children eadc0746dfaf
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,