Fix how fatal errors are recorded

This commit is contained in:
2025-03-28 12:21:41 -05:00
parent bf6a314433
commit dcf6bb63d8

View File

@@ -207,9 +207,13 @@ short menuChoiceId=-1;
#endif #endif
static void handleFatalError(std::string what) { static void handleFatalError(std::string what) {
showFatalError(what); bool was_recording = recording;
if(recording){ if(recording){
record_action("error", what); record_action("error", what);
recording = false; // Don't record click_control on the error message
}
showFatalError(what);
if(was_recording){
extern fs::path log_file; extern fs::path log_file;
if(log_file.empty() && cChoiceDlog("ask-save-replay", {"yes", "no"}).show() == "yes") { if(log_file.empty() && cChoiceDlog("ask-save-replay", {"yes", "no"}).show() == "yes") {
save_replay_log(); save_replay_log();