From 290f0fd3b004fb4cbc4d6a164f1ce3c4862f2ba5 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 21 Oct 2019 21:35:57 -0500 Subject: [PATCH] ddraw: Handle stateblocks in d3d_device7_SetTextureStageState(). Signed-off-by: Zebediah Figura Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/ddraw/device.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 253788c36a6..3702454bde0 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -5125,18 +5125,20 @@ static HRESULT d3d_device7_SetTextureStageState(IDirect3DDevice7 *iface, } case D3DTSS_ADDRESS: - wined3d_device_set_sampler_state(device->wined3d_device, stage, WINED3D_SAMP_ADDRESS_V, value); + d3d_device_set_sampler_state(device, stage, WINED3D_SAMP_ADDRESS_V, value); break; default: break; } - wined3d_device_set_sampler_state(device->wined3d_device, stage, l->u.sampler_state, value); + d3d_device_set_sampler_state(device, stage, l->u.sampler_state, value); } else { - wined3d_device_set_texture_stage_state(device->wined3d_device, stage, l->u.texture_state, value); + wined3d_stateblock_set_texture_stage_state(device->update_state, stage, l->u.texture_state, value); + if (!device->recording) + wined3d_device_set_texture_stage_state(device->wined3d_device, stage, l->u.texture_state, value); } wined3d_mutex_unlock();