mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
commited bugfix if we got if (my) dxallocfree and so on, also fixed the alloc macro it always zero the memory buffer
svn path=/trunk/; revision=26968
This commit is contained in:
parent
ef4d675d1e
commit
ac282bf4e4
2 changed files with 15 additions and 7 deletions
|
@ -41,9 +41,17 @@ VOID Cleanup(LPDIRECTDRAW7 iface);
|
||||||
#define DxHeapMemFree(p) HeapFree(GetProcessHeap(), 0, p); \
|
#define DxHeapMemFree(p) HeapFree(GetProcessHeap(), 0, p); \
|
||||||
p = NULL;
|
p = NULL;
|
||||||
*/
|
*/
|
||||||
#define DxHeapMemAlloc(p, m) p = malloc(m)
|
#define DxHeapMemAlloc(p, m) { \
|
||||||
#define DxHeapMemFree(p) free(p); \
|
p = malloc(m); \
|
||||||
p = NULL;
|
if (p != NULL) \
|
||||||
|
{ \
|
||||||
|
ZeroMemory(p,m); \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
#define DxHeapMemFree(p) { \
|
||||||
|
free(p); \
|
||||||
|
p = NULL; \
|
||||||
|
}
|
||||||
|
|
||||||
/******** Main Object ********/
|
/******** Main Object ********/
|
||||||
|
|
||||||
|
|
|
@ -486,8 +486,8 @@ StartDirectDrawHal(LPDIRECTDRAW iface, BOOL reenable)
|
||||||
|
|
||||||
/* Alloc mpFourCC */
|
/* Alloc mpFourCC */
|
||||||
|
|
||||||
//if (mHALInfo.ddCaps.dwNumFourCCCodes > 0 )
|
// if (mHALInfo.ddCaps.dwNumFourCCCodes > 0 )
|
||||||
{
|
// {
|
||||||
//mpFourCC = (DWORD *) DxHeapMemAlloc( sizeof(DWORD) * 21);
|
//mpFourCC = (DWORD *) DxHeapMemAlloc( sizeof(DWORD) * 21);
|
||||||
// DxHeapMemAlloc(mpFourCC, sizeof(DWORD) * 21);
|
// DxHeapMemAlloc(mpFourCC, sizeof(DWORD) * 21);
|
||||||
|
|
||||||
|
@ -500,7 +500,7 @@ StartDirectDrawHal(LPDIRECTDRAW iface, BOOL reenable)
|
||||||
return DD_FALSE;
|
return DD_FALSE;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
// }
|
||||||
|
|
||||||
DX_STUB_str("Here\n");
|
DX_STUB_str("Here\n");
|
||||||
|
|
||||||
|
@ -553,7 +553,7 @@ StartDirectDrawHal(LPDIRECTDRAW iface, BOOL reenable)
|
||||||
|
|
||||||
{
|
{
|
||||||
char buffer[2048];
|
char buffer[2048];
|
||||||
sprintf ( buffer, "test %d %d\n", mpFourCC, mHALInfo.ddCaps.dwNumFourCCCodes);
|
sprintf ( buffer, "3 test %d %d\n", mpFourCC, mHALInfo.ddCaps.dwNumFourCCCodes);
|
||||||
OutputDebugStringA(buffer);
|
OutputDebugStringA(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue