Commit db4a5625 authored by Sam Lantinga's avatar Sam Lantinga

Fixed crash when using double-buffering with DGA

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40203
parent 7d2934e1
......@@ -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);
}
}
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment