mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Add support for Visual Leak Detector, since valgrind doesn't support MSVC
This commit is contained in:
@ -81,6 +81,11 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
# endif
|
||||
# include <Windows.h>
|
||||
|
||||
// This needs to be after #include <windows.h>, since it also includes windows.h
|
||||
# ifdef USE_VLD
|
||||
# include <vld.h>
|
||||
# endif
|
||||
|
||||
// Just some fun typedefs...
|
||||
typedef HWND hsWindowHndl;
|
||||
typedef HINSTANCE hsWindowInst;
|
||||
|
@ -58,6 +58,11 @@ struct WinThreadParam
|
||||
|
||||
static unsigned int __stdcall gEntryPointBT(void* param)
|
||||
{
|
||||
#ifdef USE_VLD
|
||||
// Needs to be enabled for each thread except the WinMain
|
||||
VLDEnable();
|
||||
#endif
|
||||
|
||||
WinThreadParam* wtp = (WinThreadParam*)param;
|
||||
unsigned int result = wtp->fThread->Run();
|
||||
::ReleaseSemaphore(wtp->fQuitSemaH, 1, nil); // signal that we've quit
|
||||
|
Reference in New Issue
Block a user