ddraw: Only ddraw checks wether one can give a null pointer to SetMaterial.
This commit is contained in:
parent
f0a821a1ae
commit
bb67a925d6
|
@ -5543,6 +5543,7 @@ IDirect3DDeviceImpl_7_SetMaterial(IDirect3DDevice7 *iface,
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
TRACE("(%p)->(%p): Relay!\n", This, Mat);
|
TRACE("(%p)->(%p): Relay!\n", This, Mat);
|
||||||
|
|
||||||
|
if (!Mat) return DDERR_INVALIDPARAMS;
|
||||||
/* Note: D3DMATERIAL7 is compatible with WINED3DMATERIAL */
|
/* Note: D3DMATERIAL7 is compatible with WINED3DMATERIAL */
|
||||||
EnterCriticalSection(&ddraw_cs);
|
EnterCriticalSection(&ddraw_cs);
|
||||||
hr = IWineD3DDevice_SetMaterial(This->wineD3DDevice,
|
hr = IWineD3DDevice_SetMaterial(This->wineD3DDevice,
|
||||||
|
|
|
@ -2735,6 +2735,14 @@ static void DeviceLoadTest()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void SetMaterialTest(void)
|
||||||
|
{
|
||||||
|
HRESULT rc;
|
||||||
|
|
||||||
|
rc =IDirect3DDevice7_SetMaterial(lpD3DDevice, NULL);
|
||||||
|
ok(rc == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %x\n", rc);
|
||||||
|
}
|
||||||
|
|
||||||
START_TEST(d3d)
|
START_TEST(d3d)
|
||||||
{
|
{
|
||||||
init_function_pointers();
|
init_function_pointers();
|
||||||
|
@ -2752,6 +2760,7 @@ START_TEST(d3d)
|
||||||
SceneTest();
|
SceneTest();
|
||||||
LimitTest();
|
LimitTest();
|
||||||
D3D7EnumTest();
|
D3D7EnumTest();
|
||||||
|
SetMaterialTest();
|
||||||
CapsTest();
|
CapsTest();
|
||||||
VertexBufferDescTest();
|
VertexBufferDescTest();
|
||||||
D3D7_OldRenderStateTest();
|
D3D7_OldRenderStateTest();
|
||||||
|
|
|
@ -3144,8 +3144,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetClipStatus(IWineD3DDevice *iface,
|
||||||
static HRESULT WINAPI IWineD3DDeviceImpl_SetMaterial(IWineD3DDevice *iface, CONST WINED3DMATERIAL* pMaterial) {
|
static HRESULT WINAPI IWineD3DDeviceImpl_SetMaterial(IWineD3DDevice *iface, CONST WINED3DMATERIAL* pMaterial) {
|
||||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||||
|
|
||||||
if (!pMaterial) return WINED3DERR_INVALIDCALL;
|
|
||||||
|
|
||||||
This->updateStateBlock->changed.material = TRUE;
|
This->updateStateBlock->changed.material = TRUE;
|
||||||
This->updateStateBlock->material = *pMaterial;
|
This->updateStateBlock->material = *pMaterial;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue