WINED3D: Standalone surfaces

H. Verbeet hverbeet at gmail.com
Mon Feb 6 17:26:25 CST 2006


Standalone surfaces shouldn't set the container to the device.
Although setting the surface container to the device doesn't really
hurt, other than keeping an extra reference to the device, it has no
usefull purpose either.

Changelog:
  - Don't set the container to the device for standalone surfaces
-------------- next part --------------
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 635dd5b..f814973 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -725,7 +725,8 @@ HRESULT  WINAPI IWineD3DDeviceImpl_Creat
 
     /** Create and initialise the surface resource **/
     D3DCREATERESOURCEOBJECTINSTANCE(object,Surface,D3DRTYPE_SURFACE, Size)
-    IWineD3DSurface_SetContainer((IWineD3DSurface *)object, (IWineD3DBase *)This);
+    /* "Standalone" surface */
+    IWineD3DSurface_SetContainer((IWineD3DSurface *)object, NULL);
 
     object->currentDesc.Width      = Width;
     object->currentDesc.Height     = Height;


More information about the wine-patches mailing list