Output a log, savegame and screenshot on desync events
This commit is contained in:
@@ -517,6 +517,8 @@ class CrashLogUnix : public CrashLog {
|
||||
#endif
|
||||
|
||||
public:
|
||||
struct DesyncTag {};
|
||||
|
||||
/**
|
||||
* A crash log is always generated by signal.
|
||||
* @param signum the signal that was caused by the crash.
|
||||
@@ -544,6 +546,15 @@ public:
|
||||
{
|
||||
}
|
||||
#endif /* WITH_SIGACTION */
|
||||
|
||||
CrashLogUnix(DesyncTag tag) : signum(0)
|
||||
{
|
||||
#ifdef WITH_SIGACTION
|
||||
this->si = nullptr;
|
||||
this->context = nullptr;
|
||||
this->signal_instruction_ptr_valid = false;
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
/** The signals we want our crash handler to handle. */
|
||||
@@ -608,3 +619,9 @@ static void CDECL HandleCrash(int signum)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/* static */ void CrashLog::DesyncCrashLog()
|
||||
{
|
||||
CrashLogUnix log(CrashLogUnix::DesyncTag{});
|
||||
log.MakeDesyncCrashLog();
|
||||
}
|
||||
|
Reference in New Issue
Block a user