add missing lock

This commit is contained in:
FunkyFr3sh 2017-11-15 06:33:31 +01:00
parent 2dd84d86f6
commit 9821d80044
3 changed files with 16 additions and 12 deletions

View file

@ -120,11 +120,22 @@ HRESULT __stdcall ddraw_surface_Blt(IDirectDrawSurfaceImpl *This, LPRECT lpDestR
unsigned char* from=Source->surface + y0*Source->width + x0;
int s = x1-x0;
int y;
for(y=y0; y<y1; ++y, to+=This->width, from+=Source->width)
{
memcpy(to, from, s);
}
if((This->caps & DDSCAPS_PRIMARYSURFACE) && !(This->flags & DDSD_BACKBUFFERCOUNT))
{
EnterCriticalSection(&ddraw->cs);
int y;
for(y=y0; y<y1; ++y, to+=This->width, from+=Source->width)
memcpy(to, from, s);
LeaveCriticalSection(&ddraw->cs);
}
else
{
int y;
for(y=y0; y<y1; ++y, to+=This->width, from+=Source->width)
memcpy(to, from, s);
}
}
return DD_OK;