Skip to content
Snippets Groups Projects
Commit 684017c0 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard
Browse files

wined3d: Properly reset the stateblock.

parent ef7365a4
No related branches found
No related tags found
No related merge requests found
......@@ -7125,6 +7125,17 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE
This->exStyle = exStyle;
}
TRACE("Resetting stateblock\n");
IWineD3DStateBlock_Release((IWineD3DStateBlock *)This->updateStateBlock);
IWineD3DStateBlock_Release((IWineD3DStateBlock *)This->stateBlock);
/* Note: No parent needed for initial internal stateblock */
hr = IWineD3DDevice_CreateStateBlock(iface, WINED3DSBT_INIT, (IWineD3DStateBlock **)&This->stateBlock, NULL);
if (FAILED(hr)) ERR("Resetting the stateblock failed with error 0x%08x\n", hr);
else TRACE("Created stateblock %p\n", This->stateBlock);
This->updateStateBlock = This->stateBlock;
IWineD3DStateBlock_AddRef((IWineD3DStateBlock *)This->updateStateBlock);
hr = IWineD3DStateBlock_InitStartupStateBlock((IWineD3DStateBlock *) This->stateBlock);
if(FAILED(hr)) {
ERR("Resetting the stateblock failed with error 0x%08x\n", hr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment