Skip to content

Commit

Permalink
[WINESYNC] d3d9: Handle stateblocks in d3d9_device_SetRenderState().
Browse files Browse the repository at this point in the history
Signed-off-by: Zebediah Figura <[email protected]>
Signed-off-by: Henri Verbeet <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>

wine commit id c9ee1b0b88043c390634eb266126854afaec6c0a by Zebediah Figura <[email protected]>
  • Loading branch information
winesync authored and DarkFire01 committed Sep 12, 2023
1 parent b0c1885 commit db9e40c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dll/directx/wine/d3d9/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -2272,14 +2272,18 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_SetRenderState(IDirect3DDevi
{
wined3d_color_from_d3dcolor(&factor, value);
wined3d_mutex_lock();
wined3d_device_set_blend_state(device->wined3d_device, NULL, &factor);
wined3d_stateblock_set_blend_factor(device->update_state, &factor);
if (!device->recording)
wined3d_device_set_blend_state(device->wined3d_device, NULL, &factor);
wined3d_mutex_unlock();

return D3D_OK;
}

wined3d_mutex_lock();
wined3d_device_set_render_state(device->wined3d_device, state, value);
wined3d_stateblock_set_render_state(device->update_state, state, value);
if (!device->recording)
wined3d_device_set_render_state(device->wined3d_device, state, value);
wined3d_mutex_unlock();

return D3D_OK;
Expand Down

0 comments on commit db9e40c

Please sign in to comment.