WINED3D: Return D3DERR_INVALIDCALL when calling BeginStateBlock and
already recording.
H. Verbeet
hverbeet at gmail.com
Sat Dec 3 05:22:38 CST 2005
Calling BeginStateBlock while already recording should return
D3DERR_INVALIDCALL. Verified on w2k. Keeps the Battlefield 2 Demo from
crashing a little bit longer.
Changelog:
- Return D3DERR_INVALIDCALL when calling BeginStateBlock and already
recording.
-------------- next part --------------
fd35ca18432ba36667e364b6d8419ab39056d5e0
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 9b8dc5c..185bca7 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4493,6 +4493,11 @@ HRESULT WINAPI IWineD3DDeviceImpl_BeginS
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
IWineD3DStateBlockImpl *object;
TRACE("(%p)", This);
+
+ if (This->isRecordingState) {
+ return D3DERR_INVALIDCALL;
+ }
+
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IWineD3DStateBlockImpl));
if (NULL == object ) {
FIXME("(%p)Error allocating memory for stateblock\n", This);
More information about the wine-patches
mailing list