mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 22:20:26 +00:00
ddraw: Filter invalid texture stage states passed by the application.
This commit is contained in:
parent
19067f1256
commit
4194d8040f
@ -4776,6 +4776,13 @@ IDirect3DDeviceImpl_7_GetTextureStageState(IDirect3DDevice7 *iface,
|
||||
if(!State)
|
||||
return DDERR_INVALIDPARAMS;
|
||||
|
||||
if (TexStageStateType > D3DTSS_TEXTURETRANSFORMFLAGS)
|
||||
{
|
||||
WARN("Invalid TexStageStateType %#x passed.\n", TexStageStateType);
|
||||
*State = 0;
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
EnterCriticalSection(&ddraw_cs);
|
||||
|
||||
if (l->sampler_state)
|
||||
@ -4896,6 +4903,12 @@ IDirect3DDeviceImpl_7_SetTextureStageState(IDirect3DDevice7 *iface,
|
||||
HRESULT hr;
|
||||
TRACE("(%p)->(%08x,%08x,%08x): Relay!\n", This, Stage, TexStageStateType, State);
|
||||
|
||||
if (TexStageStateType > D3DTSS_TEXTURETRANSFORMFLAGS)
|
||||
{
|
||||
WARN("Invalid TexStageStateType %#x passed.\n", TexStageStateType);
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
EnterCriticalSection(&ddraw_cs);
|
||||
|
||||
if (l->sampler_state)
|
||||
|
Loading…
Reference in New Issue
Block a user