1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 12:12:50 +01:00

Qt: Force reset of debugger when a different game is running

This commit is contained in:
Megamouse 2024-09-05 22:57:36 +02:00 committed by Elad
parent 303c6715dd
commit deba582353
2 changed files with 4 additions and 1 deletions

View File

@ -980,12 +980,14 @@ Q_DECLARE_METATYPE(data_type);
void debugger_frame::UpdateUnitList() void debugger_frame::UpdateUnitList()
{ {
const u64 emulation_id = static_cast<std::underlying_type_t<Emulator::stop_counter_t>>(Emu.GetEmulationIdentifier());
const u64 threads_created = cpu_thread::g_threads_created; const u64 threads_created = cpu_thread::g_threads_created;
const u64 threads_deleted = cpu_thread::g_threads_deleted; const u64 threads_deleted = cpu_thread::g_threads_deleted;
const system_state emu_state = Emu.GetStatus(); const system_state emu_state = Emu.GetStatus();
if (threads_created != m_threads_created || threads_deleted != m_threads_deleted || emu_state != m_emu_state) if (emulation_id != m_emulation_id || threads_created != m_threads_created || threads_deleted != m_threads_deleted || emu_state != m_emu_state)
{ {
m_emulation_id = emulation_id;
m_threads_created = threads_created; m_threads_created = threads_created;
m_threads_deleted = threads_deleted; m_threads_deleted = threads_deleted;
m_emu_state = emu_state; m_emu_state = emu_state;

View File

@ -61,6 +61,7 @@ class debugger_frame : public custom_dock_widget
u64 m_threads_created = -1; u64 m_threads_created = -1;
u64 m_threads_deleted = -1; u64 m_threads_deleted = -1;
system_state m_emu_state{}; system_state m_emu_state{};
u64 m_emulation_id{};
u32 m_last_pc = -1; u32 m_last_pc = -1;
std::vector<char> m_last_query_state; std::vector<char> m_last_query_state;
std::string m_last_reg_state; std::string m_last_reg_state;