mirror of
https://github.com/reactos/reactos.git
synced 2024-10-30 03:27:31 +00:00
6afbc8f483
svn path=/branches/reactos-yarotows/; revision=45219
67 lines
1.3 KiB
C
67 lines
1.3 KiB
C
/* $Id: main.c 21434 2006-04-01 19:12:56Z greatlrd $
|
|
*
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
* PROJECT: ReactOS kernel
|
|
* FILE: lib/ddraw/ddraw.c
|
|
* PURPOSE: DirectDraw Library
|
|
* PROGRAMMER: Magnus Olsen (greatlrd)
|
|
*
|
|
*/
|
|
|
|
#include <windows.h>
|
|
#include "rosdraw.h"
|
|
#include "d3dhal.h"
|
|
|
|
VOID
|
|
Cleanup(LPDDRAWI_DIRECTDRAW_INT This)
|
|
{
|
|
DX_WINDBG_trace();
|
|
|
|
if (ddgbl.lpDDCBtmp != NULL)
|
|
{
|
|
DxHeapMemFree(ddgbl.lpDDCBtmp);
|
|
}
|
|
|
|
if (ddgbl.lpdwFourCC != NULL)
|
|
{
|
|
DxHeapMemFree(ddgbl.lpdwFourCC);
|
|
}
|
|
|
|
if (ddgbl.lpModeInfo != NULL)
|
|
{
|
|
DxHeapMemFree(ddgbl.lpModeInfo);
|
|
}
|
|
|
|
DdDeleteDirectDrawObject(&ddgbl);
|
|
|
|
/*
|
|
anything else to release?
|
|
*/
|
|
|
|
/* release the linked interface */
|
|
//while (IsBadWritePtr( This->lpVtbl, sizeof( LPDDRAWI_DIRECTDRAW_INT )) )
|
|
//{
|
|
// LPDDRAWI_DIRECTDRAW_INT newThis = This->lpVtbl;
|
|
// if (This->lpLcl != NULL)
|
|
// {
|
|
// DeleteDC(This->lpLcl->hDC);
|
|
// DxHeapMemFree(This->lpLcl);
|
|
// }
|
|
|
|
// DxHeapMemFree(This);
|
|
// This = newThis;
|
|
//}
|
|
|
|
/* release unlinked interface */
|
|
if (This->lpLcl != NULL)
|
|
{
|
|
DxHeapMemFree(This->lpLcl);
|
|
}
|
|
//if (This != NULL)
|
|
//{
|
|
// DxHeapMemFree(This);
|
|
//}
|
|
|
|
}
|
|
|