Skip to content

Commit

Permalink
Fixed crash when using double-buffering with DGA
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Sep 30, 2001
1 parent db488c4 commit 299790f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/video/dga/SDL_dgavideo.c
Expand Up @@ -531,7 +531,6 @@ SDL_Surface *DGA_SetVideoMode(_THIS, SDL_Surface *current,
flip_address[1] = memory_base+screen_len;
surfaces_mem += screen_len;
surfaces_len -= screen_len;
DGA_FlipHWSurface(this, current);
}
}

Expand All @@ -542,6 +541,13 @@ SDL_Surface *DGA_SetVideoMode(_THIS, SDL_Surface *current,
}
DGA_InitHWSurfaces(this, current, surfaces_mem, surfaces_len);

/* Expose the back buffer as surface memory */
if ( current->flags & SDL_DOUBLEBUF ) {
this->screen = current;
DGA_FlipHWSurface(this, current);
this->screen = NULL;
}

/* Set the update rectangle function */
this->UpdateRects = DGA_DirectUpdate;

Expand Down

0 comments on commit 299790f

Please sign in to comment.