mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-25 12:12:50 +01:00
report_fatal_error: Minor cleanup and improvement
This commit is contained in:
parent
4512c10ce5
commit
d39361705a
@ -2640,6 +2640,21 @@ void thread_base::exec()
|
|||||||
sys_log.notice("\n%s", info);
|
sys_log.notice("\n%s", info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string reason_buf;
|
||||||
|
|
||||||
|
if (auto ppu = cpu_thread::get_current<ppu_thread>())
|
||||||
|
{
|
||||||
|
if (auto func = ppu->current_function)
|
||||||
|
{
|
||||||
|
fmt::append(reason_buf, "%s (PPU: %s)", reason, func);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!reason_buf.empty())
|
||||||
|
{
|
||||||
|
reason = reason_buf;
|
||||||
|
}
|
||||||
|
|
||||||
sig_log.fatal("Thread terminated due to fatal error: %s", reason);
|
sig_log.fatal("Thread terminated due to fatal error: %s", reason);
|
||||||
|
|
||||||
logs::listener::sync_all();
|
logs::listener::sync_all();
|
||||||
|
@ -132,7 +132,17 @@ LOG_CHANNEL(q_debug, "QDEBUG");
|
|||||||
}
|
}
|
||||||
|
|
||||||
const system_state state = Emu.GetStatus(false);
|
const system_state state = Emu.GetStatus(false);
|
||||||
fmt::append(buf, "\nTitle: \"%s\" (emulation is %s)", state == system_state::stopped ? "N/A" : Emu.GetTitleAndTitleID(), state <= system_state::stopping ? "stopped" : "running");
|
|
||||||
|
if (state == system_state::stopped)
|
||||||
|
{
|
||||||
|
fmt::append(buf, "\nEmulation is stopped");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const std::string& name = Emu.GetTitleAndTitleID();
|
||||||
|
fmt::append(buf, "\nTitle: \"%s\" (emulation is %s)", name.empty() ? "N/A" : name.data(), state == system_state::stopping ? "stopping" : "running");
|
||||||
|
}
|
||||||
|
|
||||||
fmt::append(buf, "\nBuild: \"%s\"", rpcs3::get_verbose_version());
|
fmt::append(buf, "\nBuild: \"%s\"", rpcs3::get_verbose_version());
|
||||||
fmt::append(buf, "\nDate: \"%s\"", std::chrono::system_clock::now());
|
fmt::append(buf, "\nDate: \"%s\"", std::chrono::system_clock::now());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user