When flipping backbuffer -> frontbuffer, first exchange surfaces, then

copy XImage, since the palette might only be defined in the frontbuffer.
This commit is contained in:
Marcus Meissner 1999-08-04 14:26:50 +00:00 committed by Alexandre Julliard
parent d178fb0266
commit af0cff550d
1 changed files with 2 additions and 2 deletions

View File

@ -840,8 +840,6 @@ static HRESULT WINAPI Xlib_IDirectDrawSurface4Impl_Flip(
if (!This->s.ddraw->d.paintable)
return DD_OK;
Xlib_copy_surface_on_screen(iflipto);
/* We need to switch the lowlevel surfaces, for xlib this is: */
/* The surface pointer */
surf = This->s.surface_desc.y.lpSurface;
@ -852,6 +850,8 @@ static HRESULT WINAPI Xlib_IDirectDrawSurface4Impl_Flip(
This->t.xlib.image = iflipto->t.xlib.image;
iflipto->t.xlib.image = image;
Xlib_copy_surface_on_screen(This);
if (iflipto->s.palette && iflipto->s.palette->cm)
TSXSetWindowColormap(display,This->s.ddraw->d.drawable,iflipto->s.palette->cm);
return DD_OK;