ddraw: Get rid of the surfaces field in IDirectDrawImpl.

This commit is contained in:
Henri Verbeet 2011-09-14 20:17:28 +02:00 committed by Alexandre Julliard
parent e7a652395b
commit f60b54d952
4 changed files with 2 additions and 6 deletions

View File

@ -2633,7 +2633,6 @@ static HRESULT ddraw_create_surface(IDirectDrawImpl *This, DDSURFACEDESC2 *pDDSD
}
/* Increase the surface counter, and attach the surface */
InterlockedIncrement(&This->surfaces);
list_add_head(&This->surface_list, &(*ppSurf)->surface_list_entry);
TRACE("Created surface %p.\n", *ppSurf);

View File

@ -114,7 +114,6 @@ struct IDirectDrawImpl
* because of IParent
*/
struct list surface_list;
LONG surfaces;
/* FVF management */
struct FvfToDecl *decls;

View File

@ -960,9 +960,8 @@ DllMain(HINSTANCE hInstDLL,
ERR("(%p) EnumSurfaces failed, prepare for trouble\n", ddraw);
}
/* Check the surface count */
if(ddraw->surfaces > 0)
ERR("DDraw %p still has %d surfaces attached\n", ddraw, ddraw->surfaces);
if (!list_empty(&ddraw->surface_list))
ERR("DDraw %p still has surfaces attached.\n", ddraw);
/* Release all hanging references to destroy the objects. This
* restores the screen mode too

View File

@ -5098,7 +5098,6 @@ static void STDMETHODCALLTYPE ddraw_surface_wined3d_object_destroyed(void *paren
ddraw_free_handle(&surface->ddraw->d3ddevice->handle_table, surface->Handle - 1, DDRAW_HANDLE_SURFACE);
/* Reduce the ddraw surface count. */
InterlockedDecrement(&surface->ddraw->surfaces);
list_remove(&surface->surface_list_entry);
HeapFree(GetProcessHeap(), 0, surface);