Henri Verbeet : wined3d: Properly reset the stateblock.
Alexandre Julliard
julliard at winehq.org
Sat Dec 20 06:35:17 CST 2008
Module: wine
Branch: master
Commit: 684017c0710a2745ead31ae643a4f28f43dd8bc0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=684017c0710a2745ead31ae643a4f28f43dd8bc0
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Fri Dec 19 19:21:55 2008 +0100
wined3d: Properly reset the stateblock.
---
dlls/wined3d/device.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index f4554eb..36fbcba 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -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);
More information about the wine-cvs
mailing list