[PATCH v2 5/6] ddraw: Retrieve render state from the primary stateblock.
Zebediah Figura
z.figura12 at gmail.com
Wed Nov 27 23:53:41 CST 2019
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
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 def3e7c2a43..d4dd74f8ae3 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
More information about the wine-devel
mailing list