From: Zebediah Figura Subject: [PATCH 2/5] d3d9: Retrieve render state from the primary stateblock. Message-Id: <20191128015239.15259-2-z.figura12@gmail.com> Date: Wed, 27 Nov 2019 19:52:36 -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/d3d9/device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 2d66c569938..51b7f4d6f59 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -2329,6 +2329,7 @@ static HRESULT WINAPI d3d9_device_GetRenderState(IDirect3DDevice9Ex *iface, D3DRENDERSTATETYPE state, DWORD *value) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); + const struct wined3d_stateblock_state *device_state; struct wined3d_color factor; TRACE("iface %p, state %#x, value %p.\n", iface, state, value); @@ -2344,7 +2345,8 @@ static HRESULT WINAPI d3d9_device_GetRenderState(IDirect3DDevice9Ex *iface, } wined3d_mutex_lock(); - *value = wined3d_device_get_render_state(device->wined3d_device, state); + device_state = wined3d_stateblock_get_state(device->state); + *value = device_state->rs[state]; wined3d_mutex_unlock(); return D3D_OK; -- 2.23.0