Skip to content

Commit

Permalink
Setup SWVP toggle for mixed mode devices
Browse files Browse the repository at this point in the history
  • Loading branch information
WinterSnowfall committed Oct 16, 2024
1 parent b5d8458 commit 9cb5712
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/d3d8to9_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,11 @@ HRESULT STDMETHODCALLTYPE Direct3DDevice8::SetRenderState(D3DRENDERSTATETYPE Sta
case D3DRS_ZVISIBLE:
case D3DRS_PATCHSEGMENTS:
case D3DRS_LINEPATTERN:
return D3D_OK;
case D3DRS_SOFTWAREVERTEXPROCESSING:
// This D3D9 call will fail if the device isn't created with
// D3DCREATE_MIXED_VERTEXPROCESSING, but return D3D_OK regardless
ProxyInterface->SetSoftwareVertexProcessing(static_cast<BOOL>(Value));
return D3D_OK;
case D3DRS_EDGEANTIALIAS:
return ProxyInterface->SetRenderState(D3DRS_ANTIALIASEDLINEENABLE, Value);
Expand Down Expand Up @@ -790,7 +794,7 @@ HRESULT STDMETHODCALLTYPE Direct3DDevice8::GetRenderState(D3DRENDERSTATETYPE Sta
*pValue = static_cast<DWORD>(*reinterpret_cast<const FLOAT*>(pValue) * -200000.0f);
return hr;
case D3DRS_SOFTWAREVERTEXPROCESSING:
*pValue = ProxyInterface->GetSoftwareVertexProcessing();
*pValue = static_cast<DWORD>(ProxyInterface->GetSoftwareVertexProcessing());
return D3D_OK;
case D3DRS_PATCHSEGMENTS:
*pValue = 1;
Expand Down

0 comments on commit 9cb5712

Please sign in to comment.