From 87140ab4cce6bea38234947f646744d3aef311d6 Mon Sep 17 00:00:00 2001 From: Eladash <18193363+elad335@users.noreply.github.com> Date: Mon, 1 Jan 2024 10:33:41 +0200 Subject: [PATCH] Qt: Add build version, title, emulation state and date to fatal error dialog --- rpcs3/main.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/rpcs3/main.cpp b/rpcs3/main.cpp index 3d9dc99ba9..957fc5e2e8 100644 --- a/rpcs3/main.cpp +++ b/rpcs3/main.cpp @@ -105,31 +105,25 @@ LOG_CHANNEL(q_debug, "QDEBUG"); #ifdef __linux__ extern void jit_announce(uptr, usz, std::string_view); #endif - - std::string buf; + std::string buf(_text); // Check if thread id is in string if (_text.find("\nThread id = "sv) == umax && !thread_ctrl::is_main()) { - // Copy only when needed - buf = std::string(_text); - // Append thread id if it isn't already, except on main thread fmt::append(buf, "\n\nThread id = %u.", thread_ctrl::get_tid()); } if (!g_tls_serialize_name.empty()) { - // Copy only when needed - if (!buf.empty()) - { - buf = std::string(_text); - } - fmt::append(buf, "\nSerialized Object: %s", g_tls_serialize_name); } - std::string_view text = buf.empty() ? _text : buf; + fmt::append(buf, "\nTitle: \"%s\" (emulation is %s)", Emu.GetTitleAndTitleID(), Emu.IsStopped() ? "stopped" : "running"); + fmt::append(buf, "\nBuild: \"%s\"", rpcs3::get_verbose_version()); + fmt::append(buf, "\nDate: \"%s\"", std::chrono::system_clock::now()); + + std::string_view text = buf; if (s_headless) {