From 31df99f7d68651a488eced1be8c50079a2e762ab Mon Sep 17 00:00:00 2001 From: Elad Ashkenazi Date: Tue, 19 Jul 2022 18:05:51 +0300 Subject: [PATCH] Logs: Flush unreported errors when turning off Stack Cell errors (#12366) --- rpcs3/Emu/System.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index b093e026a9..d1812de216 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -2566,13 +2566,6 @@ s32 error_code::error_report(s32 result, const char* fmt, const fmt_type_info* s if (!fmt) { // Report and clean error state - - if (g_log_all_errors) [[unlikely]] - { - g_tls_error_stats.clear(); - return 0; - } - for (auto&& pair : g_tls_error_stats) { if (pair.second > 3) @@ -2613,6 +2606,12 @@ s32 error_code::error_report(s32 result, const char* fmt, const fmt_type_info* s if (g_log_all_errors) [[unlikely]] { + if (!g_tls_error_stats.empty()) + { + // Report and clean error state + error_report(0, nullptr, nullptr, nullptr); + } + channel->error("%s", g_tls_error_str); } else