mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-24 17:49:52 +01:00
Force access violation in debug build to produce a dmp file for debugging (disables watson)
This commit is contained in:
parent
6ad443cfb1
commit
00bb6254a0
@ -8,6 +8,7 @@
|
|||||||
#include "dllmain.h"
|
#include "dllmain.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
#include "patch.h"
|
||||||
#include "versionhelpers.h"
|
#include "versionhelpers.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
@ -655,6 +656,12 @@ void hook_init()
|
|||||||
DetourUpdateThread(GetCurrentThread());
|
DetourUpdateThread(GetCurrentThread());
|
||||||
DetourAttach((PVOID*)&real_SetUnhandledExceptionFilter, (PVOID)fake_SetUnhandledExceptionFilter);
|
DetourAttach((PVOID*)&real_SetUnhandledExceptionFilter, (PVOID)fake_SetUnhandledExceptionFilter);
|
||||||
DetourTransactionCommit();
|
DetourTransactionCommit();
|
||||||
|
|
||||||
|
if (!IsDebuggerPresent())
|
||||||
|
{
|
||||||
|
/* Force access violation to produce a dmp file for debugging (disables watson) */
|
||||||
|
PATCH_SET((void*)_invoke_watson, "\xC6\x05\x00\x00\x00\x00\x00");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user