Commit f580d052 authored by Sam Lantinga's avatar Sam Lantinga

Fixed missing cursor after shadow buffer flip (thanks Jan!)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40489
parent aee272f0
...@@ -994,8 +994,9 @@ void SDL_UpdateRects (SDL_Surface *screen, int numrects, SDL_Rect *rects) ...@@ -994,8 +994,9 @@ void SDL_UpdateRects (SDL_Surface *screen, int numrects, SDL_Rect *rects)
SDL_VideoSurface, &rects[i]); SDL_VideoSurface, &rects[i]);
} }
} }
if ( saved_colors ) if ( saved_colors ) {
pal->colors = saved_colors; pal->colors = saved_colors;
}
/* Fall through to video surface update */ /* Fall through to video surface update */
screen = SDL_VideoSurface; screen = SDL_VideoSurface;
...@@ -1045,10 +1046,22 @@ int SDL_Flip(SDL_Surface *screen) ...@@ -1045,10 +1046,22 @@ int SDL_Flip(SDL_Surface *screen)
rect.y = 0; rect.y = 0;
rect.w = screen->w; rect.w = screen->w;
rect.h = screen->h; rect.h = screen->h;
SDL_LowerBlit(SDL_ShadowSurface,&rect, SDL_VideoSurface,&rect); if ( SHOULD_DRAWCURSOR(SDL_cursorstate) ) {
SDL_LockCursor();
if ( saved_colors ) SDL_DrawCursor(SDL_ShadowSurface);
SDL_LowerBlit(SDL_ShadowSurface, &rect,
SDL_VideoSurface, &rect);
SDL_EraseCursor(SDL_ShadowSurface);
SDL_UnlockCursor();
} else {
SDL_LowerBlit(SDL_ShadowSurface, &rect,
SDL_VideoSurface, &rect);
}
if ( saved_colors ) {
pal->colors = saved_colors; pal->colors = saved_colors;
}
/* Fall through to video surface update */
screen = SDL_VideoSurface; screen = SDL_VideoSurface;
} }
if ( (screen->flags & SDL_DOUBLEBUF) == SDL_DOUBLEBUF ) { if ( (screen->flags & SDL_DOUBLEBUF) == SDL_DOUBLEBUF ) {
......
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