mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
#83 fix surface lock with rect
This commit is contained in:
parent
7e56551895
commit
b7f485d935
@ -690,7 +690,15 @@ HRESULT dds_Lock(IDirectDrawSurfaceImpl *This, LPRECT lpDestRect, LPDDSURFACEDES
|
|||||||
{
|
{
|
||||||
dbg_dump_dds_lock_flags(dwFlags);
|
dbg_dump_dds_lock_flags(dwFlags);
|
||||||
|
|
||||||
return dds_GetSurfaceDesc(This, lpDDSurfaceDesc);
|
HRESULT ret = dds_GetSurfaceDesc(This, lpDDSurfaceDesc);
|
||||||
|
|
||||||
|
if (lpDestRect && lpDDSurfaceDesc && lpDestRect->left >= 0 && lpDestRect->top >= 0)
|
||||||
|
{
|
||||||
|
lpDDSurfaceDesc->lpSurface =
|
||||||
|
(char*)This->surface + (lpDestRect->left * This->lx_pitch) + (lpDestRect->top * This->l_pitch);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT dds_SetColorKey(IDirectDrawSurfaceImpl *This, DWORD flags, LPDDCOLORKEY colorKey)
|
HRESULT dds_SetColorKey(IDirectDrawSurfaceImpl *This, DWORD flags, LPDDCOLORKEY colorKey)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user