Zebediah Figura : ddraw: Retrieve render state from the primary stateblock.
Module: wine Branch: master Commit: 9512fee2e02620248c8c9ba2ee8b5415b625f6b3 URL: https://source.winehq.org/git/wine.git/?a=commit;h=9512fee2e02620248c8c9ba2e... Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Nov 27 23:53:41 2019 -0600 ddraw: Retrieve render state from the primary stateblock. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- 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 def3e7c2a4..d4dd74f8ae 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();
participants (1)
-
Alexandre Julliard