From deba582353ae7f725577e3c4968b10f39c068ef2 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Thu, 5 Sep 2024 22:57:36 +0200 Subject: [PATCH] Qt: Force reset of debugger when a different game is running --- rpcs3/rpcs3qt/debugger_frame.cpp | 4 +++- rpcs3/rpcs3qt/debugger_frame.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcs3/rpcs3qt/debugger_frame.cpp b/rpcs3/rpcs3qt/debugger_frame.cpp index 185a48c456..fdc8880368 100644 --- a/rpcs3/rpcs3qt/debugger_frame.cpp +++ b/rpcs3/rpcs3qt/debugger_frame.cpp @@ -980,12 +980,14 @@ Q_DECLARE_METATYPE(data_type); void debugger_frame::UpdateUnitList() { + const u64 emulation_id = static_cast>(Emu.GetEmulationIdentifier()); const u64 threads_created = cpu_thread::g_threads_created; const u64 threads_deleted = cpu_thread::g_threads_deleted; 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_deleted = threads_deleted; m_emu_state = emu_state; diff --git a/rpcs3/rpcs3qt/debugger_frame.h b/rpcs3/rpcs3qt/debugger_frame.h index 413bf5ad2d..c39a8f05ad 100644 --- a/rpcs3/rpcs3qt/debugger_frame.h +++ b/rpcs3/rpcs3qt/debugger_frame.h @@ -61,6 +61,7 @@ class debugger_frame : public custom_dock_widget u64 m_threads_created = -1; u64 m_threads_deleted = -1; system_state m_emu_state{}; + u64 m_emulation_id{}; u32 m_last_pc = -1; std::vector m_last_query_state; std::string m_last_reg_state;