mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
VEH Clean-up.
This commit is contained in:
parent
22506fa689
commit
e24b9b90a5
@ -143,26 +143,18 @@ long __stdcall ExceptionFilter(EXCEPTION_POINTERS* exceptionInfo)
|
|||||||
if (g_ExceptionToString.find(exceptionInfo->ExceptionRecord->ExceptionCode) == g_ExceptionToString.end())
|
if (g_ExceptionToString.find(exceptionInfo->ExceptionRecord->ExceptionCode) == g_ExceptionToString.end())
|
||||||
return EXCEPTION_CONTINUE_SEARCH;
|
return EXCEPTION_CONTINUE_SEARCH;
|
||||||
|
|
||||||
#ifndef _DEBUG
|
|
||||||
// THIS WONT WORK ON DEBUG!!!
|
|
||||||
// THIS IS DUE TO A JMP TABLE CREATED BY MSVC!!
|
|
||||||
static void* imiRetAddr = nullptr;
|
|
||||||
static auto find_IMI_ref = CMemory(IsMaterialInternal).FindAllCallReferences(reinterpret_cast<uintptr_t>(BuildPropStaticFrustumCullMap), 1000);
|
|
||||||
if (!find_IMI_ref.empty())
|
|
||||||
{
|
|
||||||
imiRetAddr = find_IMI_ref.at(0).Offset(0x5).RCast<void*>();
|
|
||||||
}
|
|
||||||
#endif // _DEBUG
|
|
||||||
|
|
||||||
// Now get the callstack..
|
// Now get the callstack..
|
||||||
constexpr DWORD NUM_FRAMES_TO_CAPTURE = 60;
|
constexpr DWORD NUM_FRAMES_TO_CAPTURE = 60;
|
||||||
void* pStackTrace[NUM_FRAMES_TO_CAPTURE] = { 0 };
|
void* pStackTrace[NUM_FRAMES_TO_CAPTURE] = { 0 };
|
||||||
WORD nCapturedFrames = RtlCaptureStackBackTrace(0, NUM_FRAMES_TO_CAPTURE, pStackTrace, NULL);
|
WORD nCapturedFrames = RtlCaptureStackBackTrace(0, NUM_FRAMES_TO_CAPTURE, pStackTrace, NULL);
|
||||||
|
|
||||||
#ifndef _DEBUG
|
#ifndef _DEBUG
|
||||||
// Check if we found IMI.
|
// THIS WONT WORK ON DEBUG!!!
|
||||||
if (imiRetAddr)
|
// THIS IS DUE TO A JMP TABLE CREATED BY MSVC!!
|
||||||
|
static auto find_IMI_ref = CMemory(IsMaterialInternal).FindAllCallReferences(reinterpret_cast<uintptr_t>(BuildPropStaticFrustumCullMap), 1000);
|
||||||
|
if (!find_IMI_ref.empty())
|
||||||
{
|
{
|
||||||
|
const void* imiRetAddr = find_IMI_ref.at(0).Offset(0x5).RCast<void*>();
|
||||||
for (WORD i = 0; i < 10; i++)
|
for (WORD i = 0; i < 10; i++)
|
||||||
{
|
{
|
||||||
if (imiRetAddr == pStackTrace[i])
|
if (imiRetAddr == pStackTrace[i])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user