| 209 | void jit_announce(uptr, usz, std::string_view); |
| 210 | |
| 211 | [[noreturn]] void report_fatal_error(std::string_view _text, |
| 212 | bool is_html = false, |
| 213 | bool include_help_text = true) { |
| 214 | std::string buf; |
| 215 | |
| 216 | buf = std::string(_text); |
| 217 | |
| 218 | // Check if thread id is in string |
| 219 | if (_text.find("\nThread id = "sv) == umax && !thread_ctrl::is_main()) { |
| 220 | // Append thread id if it isn't already, except on main thread |
| 221 | fmt::append(buf, "\n\nThread id = %u.", thread_ctrl::get_tid()); |
| 222 | } |
| 223 | |
| 224 | if (!g_tls_serialize_name.empty()) { |
| 225 | fmt::append(buf, "\nSerialized Object: %s", g_tls_serialize_name); |
| 226 | } |
| 227 | |
| 228 | const system_state state = Emu.GetStatus(false); |
| 229 | |
| 230 | if (state == system_state::stopped) { |
| 231 | fmt::append(buf, "\nEmulation is stopped"); |
| 232 | } else { |
| 233 | const std::string &name = Emu.GetTitleAndTitleID(); |
| 234 | fmt::append(buf, "\nTitle: \"%s\" (emulation is %s)", |
| 235 | name.empty() ? "N/A" : name.data(), |
| 236 | state == system_state::stopping ? "stopping" : "running"); |
| 237 | } |
| 238 | |
| 239 | fmt::append(buf, "\nBuild: \"%s\"", rpcs3::get_verbose_version()); |
| 240 | fmt::append(buf, "\nDate: \"%s\"", std::chrono::system_clock::now()); |
| 241 | |
| 242 | __android_log_write(ANDROID_LOG_FATAL, "RPCS3", buf.c_str()); |
| 243 | |
| 244 | jit_announce(0, 0, ""); |
| 245 | rx::breakpoint(); |
| 246 | std::abort(); |
| 247 | std::terminate(); |
| 248 | } |
| 249 | |
| 250 | void qt_events_aware_op(int repeat_duration_ms, |
| 251 | std::function<bool()> wrapped_op) { |
no test coverage detected