PATCH: Fix IDirect3DTexture2Impl_Load

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch solves the texture loading in TWIST.EXE

Changelog :
    dlls/ddraw/d3dtexture.c : IDirect3DTexture2Impl_Load 
    When the surface is not allocated and no location are specified,
    set it to video memory

Christian Costa   titan.costa@wanadoo.fr

Index: d3dtexture.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/d3dtexture.c,v
retrieving revision 1.13
diff -u -r1.13 d3dtexture.c
--- d3dtexture.c	31 May 2002 23:25:45 -0000	1.13
+++ d3dtexture.c	24 Sep 2002 20:21:15 -0000
@@ -382,6 +382,12 @@
   TRACE("(%p)->(%p)\n", This, ilpD3DTexture2);
   TRACE("Copied surface %p to surface %p\n", ilpD3DTexture2->surface, This->surface);
 
+  if ( This->surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_ALLOCONLOAD )
+    /* If the surface is not allocated and its location is not yet specified,
+       force it to video memory */ 
+    if ( !(This->surface->surface_desc.ddsCaps.dwCaps & (DDSCAPS_SYSTEMMEMORY|DDSCAPS_VIDEOMEMORY)) )
+      This->surface->surface_desc.ddsCaps.dwCaps |= DDSCAPS_VIDEOMEMORY;
+
   /* Suppress the ALLOCONLOAD flag */
   This->surface->surface_desc.ddsCaps.dwCaps &= ~DDSCAPS_ALLOCONLOAD;
 

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux