mirror of
https://github.com/narzoul/DDrawCompat
synced 2024-12-30 08:55:36 +01:00
Discard invalid bits from D3DDDIRS_WRAP render state values
Fixes rendering issues in Thief 2 on Intel GMA 3600 (issue #81).
This commit is contained in:
parent
324b4a77f0
commit
240ddbda57
@ -98,6 +98,12 @@ namespace D3dDdi
|
|||||||
|
|
||||||
HRESULT DeviceState::pfnSetRenderState(const D3DDDIARG_RENDERSTATE* data)
|
HRESULT DeviceState::pfnSetRenderState(const D3DDDIARG_RENDERSTATE* data)
|
||||||
{
|
{
|
||||||
|
if (data->State >= D3DDDIRS_WRAP0 && data->State <= D3DDDIRS_WRAP7)
|
||||||
|
{
|
||||||
|
auto d = *data;
|
||||||
|
d.Value &= D3DWRAPCOORD_0 | D3DWRAPCOORD_1 | D3DWRAPCOORD_2 | D3DWRAPCOORD_3;
|
||||||
|
return setStateArray(&d, m_renderState, m_device.getOrigVtable().pfnSetRenderState);
|
||||||
|
}
|
||||||
return setStateArray(data, m_renderState, m_device.getOrigVtable().pfnSetRenderState);
|
return setStateArray(data, m_renderState, m_device.getOrigVtable().pfnSetRenderState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user