diff options
| author | 2023-12-26 11:46:04 -0500 | |
|---|---|---|
| committer | 2023-12-26 11:46:04 -0500 | |
| commit | 1559984f77c4cf7474a8f806046b709576e4e439 (patch) | |
| tree | 670b041b44aeff91afb8fce0e0e0bb288f86f326 /src/common/assert.cpp | |
| parent | Merge pull request #12472 from FearlessTobi/port-7239 (diff) | |
| parent | assert/logging: Stop the logging thread and flush the backends before crashing (diff) | |
| download | yuzu-1559984f77c4cf7474a8f806046b709576e4e439.tar.gz yuzu-1559984f77c4cf7474a8f806046b709576e4e439.tar.xz yuzu-1559984f77c4cf7474a8f806046b709576e4e439.zip | |
Merge pull request #12471 from FearlessTobi/port-7146
Port citra-emu/citra#7146: "assert/logging: Stop the logging thread and flush the backends before crashing"
Diffstat (limited to 'src/common/assert.cpp')
| -rw-r--r-- | src/common/assert.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/assert.cpp b/src/common/assert.cpp index 6026b7dc2..e2c2cade3 100644 --- a/src/common/assert.cpp +++ b/src/common/assert.cpp | |||
| @@ -3,16 +3,19 @@ | |||
| 3 | 3 | ||
| 4 | #include "common/assert.h" | 4 | #include "common/assert.h" |
| 5 | #include "common/common_funcs.h" | 5 | #include "common/common_funcs.h" |
| 6 | #include "common/logging/backend.h" | ||
| 6 | 7 | ||
| 7 | #include "common/settings.h" | 8 | #include "common/settings.h" |
| 8 | 9 | ||
| 9 | void assert_fail_impl() { | 10 | void assert_fail_impl() { |
| 10 | if (Settings::values.use_debug_asserts) { | 11 | if (Settings::values.use_debug_asserts) { |
| 12 | Common::Log::Stop(); | ||
| 11 | Crash(); | 13 | Crash(); |
| 12 | } | 14 | } |
| 13 | } | 15 | } |
| 14 | 16 | ||
| 15 | [[noreturn]] void unreachable_impl() { | 17 | [[noreturn]] void unreachable_impl() { |
| 18 | Common::Log::Stop(); | ||
| 16 | Crash(); | 19 | Crash(); |
| 17 | throw std::runtime_error("Unreachable code"); | 20 | throw std::runtime_error("Unreachable code"); |
| 18 | } | 21 | } |