From: Zebediah Figura Subject: [PATCH 4/5] ddraw: Retrieve render state from the primary stateblock. Message-Id: <20191128015239.15259-4-z.figura12@gmail.com> Date: Wed, 27 Nov 2019 19:52:38 -0600 In-Reply-To: <20191128015239.15259-1-z.figura12@gmail.com> References: <20191128015239.15259-1-z.figura12@gmail.com> Signed-off-by: Zebediah Figura --- dlls/ddraw/device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 51576c81e28..2c77b7b1acf 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -2289,6 +2289,7 @@ static HRESULT d3d_device7_GetRenderState(IDirect3DDevice7 *iface, D3DRENDERSTATETYPE state, DWORD *value) { struct d3d_device *device = impl_from_IDirect3DDevice7(iface); + const struct wined3d_stateblock_state *device_state; HRESULT hr = D3D_OK; TRACE("iface %p, state %#x, value %p.\n", iface, state, value); @@ -2297,6 +2298,7 @@ static HRESULT d3d_device7_GetRenderState(IDirect3DDevice7 *iface, return DDERR_INVALIDPARAMS; wined3d_mutex_lock(); + device_state = wined3d_stateblock_get_state(device->state); switch (state) { case D3DRENDERSTATE_TEXTUREMAG: @@ -2392,7 +2394,7 @@ static HRESULT d3d_device7_GetRenderState(IDirect3DDevice7 *iface, break; case D3DRENDERSTATE_ZBIAS: - *value = wined3d_device_get_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS); + *value = device_state->rs[WINED3D_RS_DEPTHBIAS]; break; default: @@ -2403,7 +2405,7 @@ static HRESULT d3d_device7_GetRenderState(IDirect3DDevice7 *iface, hr = E_NOTIMPL; break; } - *value = wined3d_device_get_render_state(device->wined3d_device, state); + *value = device_state->rs[state]; } wined3d_mutex_unlock(); -- 2.23.0