Skip to content

Commit fca78d4

Browse files
authored
fix: record checksum on exit (#353)
1 parent 15834de commit fca78d4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Modules/EngineDemoRecorder.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ int EngineDemoRecorder::GetTick() {
3737
return this->GetRecordingTick(this->s_ClientDemoRecorder->ThisPtr());
3838
}
3939

40+
// Stop any running demo so the SAR checksum is written to the demo file
41+
ON_EVENT(SAR_UNLOAD) {
42+
if (engine->demorecorder->isRecordingDemo) {
43+
engine->demorecorder->Stop();
44+
}
45+
}
46+
4047
std::string EngineDemoRecorder::GetDemoFilename() {
4148
#ifdef _WIN32
4249
# define PATH_SEP "\\"

0 commit comments

Comments
 (0)