Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d9/device.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 3a270a4eac..bc45a17cfc 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -3447,8 +3447,16 @@ static HRESULT WINAPI d3d9_device_SetVertexShaderConstantF(IDirect3DDevice9Ex *i }
wined3d_mutex_lock(); - hr = wined3d_device_set_vs_consts_f(device->wined3d_device, - reg_idx, count, (const struct wined3d_vec4 *)data); + memcpy(&device->update_state->vs_consts_f[reg_idx], data, count * sizeof(struct wined3d_vec4)); + if (device->recording) + { + memset(&device->recording->changed.vs_consts_f[reg_idx], 1, + count * sizeof(*device->recording->changed.vs_consts_f)); + hr = D3D_OK; + } + else + hr = wined3d_device_set_vs_consts_f(device->wined3d_device, + reg_idx, count, (const struct wined3d_vec4 *)data); wined3d_mutex_unlock();
return hr;