ddraw: Only update primary_lock when we're actually locking the frontbuffer.
This fixes a regression introduced by commit 8330558e125c9073068ffbd7741f1128c17c1e08.
This commit is contained in:
parent
61550ff1de
commit
38abddca68
@ -972,12 +972,15 @@ static HRESULT surface_lock(IDirectDrawSurfaceImpl *This,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (This->surface_desc.ddsCaps.dwCaps & DDSCAPS_FRONTBUFFER)
|
||||||
|
{
|
||||||
if (Flags & DDLOCK_READONLY)
|
if (Flags & DDLOCK_READONLY)
|
||||||
memset(&This->ddraw->primary_lock, 0, sizeof(This->ddraw->primary_lock));
|
memset(&This->ddraw->primary_lock, 0, sizeof(This->ddraw->primary_lock));
|
||||||
else if (Rect)
|
else if (Rect)
|
||||||
This->ddraw->primary_lock = *Rect;
|
This->ddraw->primary_lock = *Rect;
|
||||||
else
|
else
|
||||||
SetRect(&This->ddraw->primary_lock, 0, 0, This->surface_desc.dwWidth, This->surface_desc.dwHeight);
|
SetRect(&This->ddraw->primary_lock, 0, 0, This->surface_desc.dwWidth, This->surface_desc.dwHeight);
|
||||||
|
}
|
||||||
|
|
||||||
/* Override the memory area. The pitch should be set already. Strangely windows
|
/* Override the memory area. The pitch should be set already. Strangely windows
|
||||||
* does not set the LPSURFACE flag on locked surfaces !?!.
|
* does not set the LPSURFACE flag on locked surfaces !?!.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user