ddraw: Hold the lock in IDirectDrawGammaControl methods.

This commit is contained in:
Stefan Dösinger 2007-05-26 18:46:51 +02:00 committed by Alexandre Julliard
parent 0086d490a9
commit e38439bdfe
1 changed files with 4 additions and 0 deletions

View File

@ -141,6 +141,7 @@ IDirectDrawGammaControlImpl_GetGammaRamp(IDirectDrawGammaControl *iface,
return DDERR_INVALIDPARAMS; return DDERR_INVALIDPARAMS;
} }
EnterCriticalSection(&ddraw_cs);
if(This->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) if(This->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
{ {
/* Note: DDGAMMARAMP is compatible with WINED3DGAMMARAMP */ /* Note: DDGAMMARAMP is compatible with WINED3DGAMMARAMP */
@ -152,6 +153,7 @@ IDirectDrawGammaControlImpl_GetGammaRamp(IDirectDrawGammaControl *iface,
{ {
ERR("(%p) Unimplemented for non-primary surfaces\n", This); ERR("(%p) Unimplemented for non-primary surfaces\n", This);
} }
LeaveCriticalSection(&ddraw_cs);
return DD_OK; return DD_OK;
} }
@ -185,6 +187,7 @@ IDirectDrawGammaControlImpl_SetGammaRamp(IDirectDrawGammaControl *iface,
return DDERR_INVALIDPARAMS; return DDERR_INVALIDPARAMS;
} }
EnterCriticalSection(&ddraw_cs);
if(This->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) 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); ERR("(%p) Unimplemented for non-primary surfaces\n", This);
} }
LeaveCriticalSection(&ddraw_cs);
return DD_OK; return DD_OK;
} }