ddraw: Hold the lock in IDirect3DLight methods.
This commit is contained in:
parent
a2227de7af
commit
6eb8e3fb6f
|
@ -201,10 +201,12 @@ IDirect3DLightImpl_SetLight(IDirect3DLight *iface,
|
|||
light7->dvTheta = lpLight->dvTheta;
|
||||
light7->dvPhi = lpLight->dvPhi;
|
||||
|
||||
EnterCriticalSection(&ddraw_cs);
|
||||
memcpy(&This->light, lpLight, lpLight->dwSize);
|
||||
if ((This->light.dwFlags & D3DLIGHT_ACTIVE) != 0) {
|
||||
This->update(This);
|
||||
}
|
||||
LeaveCriticalSection(&ddraw_cs);
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
|
@ -230,7 +232,11 @@ IDirect3DLightImpl_GetLight(IDirect3DLight *iface,
|
|||
TRACE(" Returning light definition :\n");
|
||||
dump_light(&This->light);
|
||||
}
|
||||
|
||||
EnterCriticalSection(&ddraw_cs);
|
||||
memcpy(lpLight, &This->light, lpLight->dwSize);
|
||||
LeaveCriticalSection(&ddraw_cs);
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue