Commit e38439bd authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

ddraw: Hold the lock in IDirectDrawGammaControl methods.

parent 0086d490
......@@ -141,6 +141,7 @@ IDirectDrawGammaControlImpl_GetGammaRamp(IDirectDrawGammaControl *iface,
return DDERR_INVALIDPARAMS;
}
EnterCriticalSection(&ddraw_cs);
if(This->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
{
/* Note: DDGAMMARAMP is compatible with WINED3DGAMMARAMP */
......@@ -152,6 +153,7 @@ IDirectDrawGammaControlImpl_GetGammaRamp(IDirectDrawGammaControl *iface,
{
ERR("(%p) Unimplemented for non-primary surfaces\n", This);
}
LeaveCriticalSection(&ddraw_cs);
return DD_OK;
}
......@@ -185,6 +187,7 @@ IDirectDrawGammaControlImpl_SetGammaRamp(IDirectDrawGammaControl *iface,
return DDERR_INVALIDPARAMS;
}
EnterCriticalSection(&ddraw_cs);
if(This->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
{
......@@ -198,6 +201,7 @@ IDirectDrawGammaControlImpl_SetGammaRamp(IDirectDrawGammaControl *iface,
{
ERR("(%p) Unimplemented for non-primary surfaces\n", This);
}
LeaveCriticalSection(&ddraw_cs);
return DD_OK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment