- sync from gzdoom

This commit is contained in:
Rachael Alexanderson 2021-01-02 07:52:50 -05:00
parent 86bb6b1cdc
commit fc7dada764
3 changed files with 14 additions and 6 deletions

View file

@ -508,6 +508,7 @@ if (NOT ${TARGET_ARCHITECTURE} MATCHES "arm" )
set (PLAT_WIN32_SOURCES ${PLAT_WIN32_SOURCES} common/platform/win32/i_crash.cpp )
endif()
if (MSVC AND ${TARGET_ARCHITECTURE} MATCHES "arm")
set (PLAT_WIN32_SOURCES ${PLAT_WIN32_SOURCES} common/platform/win32/i_crash_arm.cpp )
add_definitions( -DNO_SSE -D__ARM__ -DRAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN)
endif()

View file

@ -0,0 +1,7 @@
// Licensed to the Public Domain by Rachael Alexandersion (c) 2021
// This file is nothing more than a stub. Please replace with a proper copyright notice if this function is implemented for ARM. Or just use the regular i_crash.cpp
void DisplayCrashLog()
{
// stub
}

View file

@ -1076,9 +1076,7 @@ void CALLBACK ExitFatally (ULONG_PTR dummy)
SetUnhandledExceptionFilter (ExitMessedUp);
I_ShutdownGraphics ();
RestoreConView ();
#ifndef _M_ARM64
DisplayCrashLog ();
#endif
exit(-1);
}
@ -1135,6 +1133,12 @@ LONG WINAPI CatchAllExceptions (LPEXCEPTION_POINTERS info)
}
return EXCEPTION_CONTINUE_EXECUTION;
}
#else // !_M_ARM64
// stub this function for ARM64
LONG WINAPI CatchAllExceptions (LPEXCEPTION_POINTERS info)
{
return EXCEPTION_CONTINUE_EXECUTION;
}
#endif // !_M_ARM64
//==========================================================================
@ -1159,11 +1163,7 @@ static void infiniterecursion(int foo)
// which offers the very important feature to open a debugger and see the crash in context right away.
CUSTOM_CVAR(Bool, disablecrashlog, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
{
#ifndef _M_ARM64
SetUnhandledExceptionFilter(!*self ? CatchAllExceptions : nullptr);
#else
SetUnhandledExceptionFilter(nullptr);
#endif
}
//==========================================================================