Only put surfaces in video memory if there are accelerated blits
authorSam Lantinga <slouken@libsdl.org>
Sun, 10 Mar 2002 03:38:32 +0000
changeset 3063879bed3395c
parent 305 9c6613983e85
child 307 0185452e9f83
Only put surfaces in video memory if there are accelerated blits
src/video/SDL_video.c
     1.1 --- a/src/video/SDL_video.c	Sun Mar 10 03:33:59 2002 +0000
     1.2 +++ b/src/video/SDL_video.c	Sun Mar 10 03:38:32 2002 +0000
     1.3 @@ -844,7 +844,10 @@
     1.4  		return(NULL);
     1.5  	}
     1.6  	/* Set the flags appropriate for copying to display surface */
     1.7 -	flags  = (SDL_PublicSurface->flags&SDL_HWSURFACE);
     1.8 +	if ((SDL_PublicSurface->flags&SDL_HWSURFACE == SDL_HWSURFACE) && current_video->info.blit_hw)
     1.9 +		flags = SDL_HWSURFACE;
    1.10 +	else 
    1.11 +		flags = SDL_SWSURFACE;
    1.12  #ifdef AUTORLE_DISPLAYFORMAT
    1.13  	flags |= (surface->flags & (SDL_SRCCOLORKEY|SDL_SRCALPHA));
    1.14  	flags |= SDL_RLEACCELOK;