Skip to content

Commit

Permalink
If a double-buffered surface was requested, and a plain hardware surface
Browse files Browse the repository at this point in the history
was returned, we should create a shadow surface.
  • Loading branch information
slouken committed Jan 26, 2003
1 parent 9e95d38 commit 39d062d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/video/SDL_video.c
Expand Up @@ -836,7 +836,10 @@ do { \
as soon as they are performed, so we need to buffer them
*/
( ((flags&SDL_HWSURFACE) == SDL_SWSURFACE) &&
(SDL_VideoSurface->flags&SDL_HWSURFACE))
(SDL_VideoSurface->flags&SDL_HWSURFACE)) ||
( (flags&SDL_DOUBLEBUF) &&
(SDL_VideoSurface->flags&SDL_HWSURFACE) &&
!(SDL_VideoSurface->flags&SDL_DOUBLEBUF))
) ) {
SDL_CreateShadowSurface(bpp);
if ( SDL_ShadowSurface == NULL ) {
Expand Down

0 comments on commit 39d062d

Please sign in to comment.