wined3d: Only flip SFLAG_DIBSECTION once in flip_surface().

We already swap all flags at a later point in flip_surface().
This commit is contained in:
Henri Verbeet 2012-01-08 21:14:58 +01:00 committed by Alexandre Julliard
parent 01992d7fb5
commit f1e2c5df93
1 changed files with 1 additions and 8 deletions

View File

@ -4740,16 +4740,9 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back)
/* Flip the DIBsection */ /* Flip the DIBsection */
{ {
HBITMAP tmp; HBITMAP tmp = front->dib.DIBsection;
BOOL hasDib = front->flags & SFLAG_DIBSECTION;
tmp = front->dib.DIBsection;
front->dib.DIBsection = back->dib.DIBsection; front->dib.DIBsection = back->dib.DIBsection;
back->dib.DIBsection = tmp; back->dib.DIBsection = tmp;
if (back->flags & SFLAG_DIBSECTION) front->flags |= SFLAG_DIBSECTION;
else front->flags &= ~SFLAG_DIBSECTION;
if (hasDib) back->flags |= SFLAG_DIBSECTION;
else back->flags &= ~SFLAG_DIBSECTION;
} }
/* Flip the surface data */ /* Flip the surface data */