Skip to content
Snippets Groups Projects
Commit 6eb8e3fb authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard
Browse files

ddraw: Hold the lock in IDirect3DLight methods.

parent a2227de7
Branches
Tags
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment