comparison src/video/SDL_video.c @ 580:be6495850a62

If a double-buffered surface was requested, and a plain hardware surface was returned, we should create a shadow surface.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 26 Jan 2003 04:30:18 +0000
parents 969fbd4dcd4e
children 95433459fbd2
comparison
equal deleted inserted replaced
579:70fa3e489399 580:be6495850a62
834 !(SDL_VideoSurface->flags&SDL_HWPALETTE)) || 834 !(SDL_VideoSurface->flags&SDL_HWPALETTE)) ||
835 /* If the surface is in hardware, video writes are visible 835 /* If the surface is in hardware, video writes are visible
836 as soon as they are performed, so we need to buffer them 836 as soon as they are performed, so we need to buffer them
837 */ 837 */
838 ( ((flags&SDL_HWSURFACE) == SDL_SWSURFACE) && 838 ( ((flags&SDL_HWSURFACE) == SDL_SWSURFACE) &&
839 (SDL_VideoSurface->flags&SDL_HWSURFACE)) 839 (SDL_VideoSurface->flags&SDL_HWSURFACE)) ||
840 ( (flags&SDL_DOUBLEBUF) &&
841 (SDL_VideoSurface->flags&SDL_HWSURFACE) &&
842 !(SDL_VideoSurface->flags&SDL_DOUBLEBUF))
840 ) ) { 843 ) ) {
841 SDL_CreateShadowSurface(bpp); 844 SDL_CreateShadowSurface(bpp);
842 if ( SDL_ShadowSurface == NULL ) { 845 if ( SDL_ShadowSurface == NULL ) {
843 SDL_SetError("Couldn't create shadow surface"); 846 SDL_SetError("Couldn't create shadow surface");
844 return(NULL); 847 return(NULL);