changeset 306:3879bed3395c

Only put surfaces in video memory if there are accelerated blits
author Sam Lantinga <slouken@libsdl.org>
date Sun, 10 Mar 2002 03:38:32 +0000
parents 9c6613983e85
children 0185452e9f83
files src/video/SDL_video.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/SDL_video.c	Sun Mar 10 03:33:59 2002 +0000
+++ b/src/video/SDL_video.c	Sun Mar 10 03:38:32 2002 +0000
@@ -844,7 +844,10 @@
 		return(NULL);
 	}
 	/* Set the flags appropriate for copying to display surface */
-	flags  = (SDL_PublicSurface->flags&SDL_HWSURFACE);
+	if ((SDL_PublicSurface->flags&SDL_HWSURFACE == SDL_HWSURFACE) && current_video->info.blit_hw)
+		flags = SDL_HWSURFACE;
+	else 
+		flags = SDL_SWSURFACE;
 #ifdef AUTORLE_DISPLAYFORMAT
 	flags |= (surface->flags & (SDL_SRCCOLORKEY|SDL_SRCALPHA));
 	flags |= SDL_RLEACCELOK;