Fix: survey result on crash only worked on Linux (#10855)

Every OS-specific crashlog handler has their own MakeCrashLog
in some form. In result, only Linux was calling the generic one.
This commit is contained in:
Patric Stout
2023-05-21 12:57:32 +02:00
committed by GitHub
parent 98dffc3157
commit 0850193a38
4 changed files with 13 additions and 3 deletions

View File

@@ -454,6 +454,13 @@ bool CrashLog::WriteScreenshot(char *filename, const char *filename_last) const
return res;
}
void CrashLog::SendSurvey() const
{
if (_game_mode == GM_NORMAL) {
_survey.Transmit(NetworkSurveyHandler::Reason::CRASH, true);
}
}
/**
* Makes the crash log, writes it to a file and then subsequently tries
* to make a crash dump and crash savegame. It uses DEBUG to write
@@ -512,9 +519,7 @@ bool CrashLog::MakeCrashLog() const
printf("Writing crash screenshot failed.\n\n");
}
if (_game_mode == GM_NORMAL) {
_survey.Transmit(NetworkSurveyHandler::Reason::CRASH, true);
}
this->SendSurvey();
return ret;
}