diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index 67ac098383..96180d7672 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -1549,7 +1549,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context) no return true; } - if (cpu->id_type() != 1) + if (cpu->id_type() == 2) { if (!g_tls_access_violation_recovered) { diff --git a/rpcs3/Emu/CPU/CPUThread.cpp b/rpcs3/Emu/CPU/CPUThread.cpp index ededc7d9c2..74475d0459 100644 --- a/rpcs3/Emu/CPU/CPUThread.cpp +++ b/rpcs3/Emu/CPU/CPUThread.cpp @@ -276,6 +276,14 @@ namespace cpu_counter { void add(cpu_thread* _this) noexcept { + switch (_this->id_type()) + { + case 1: + case 2: + break; + default: return; + } + std::lock_guard lock(s_cpu_lock); u32 id = -1; diff --git a/rpcs3/rpcs3qt/debugger_frame.cpp b/rpcs3/rpcs3qt/debugger_frame.cpp index ed913da858..a5af00a0b6 100644 --- a/rpcs3/rpcs3qt/debugger_frame.cpp +++ b/rpcs3/rpcs3qt/debugger_frame.cpp @@ -272,7 +272,7 @@ void debugger_frame::keyPressEvent(QKeyEvent* event) return; } - const u32 address_limits = (cpu->id_type() != 1 ? 0x3fffc : ~3); + const u32 address_limits = (cpu->id_type() == 2 ? 0x3fffc : ~3); const u32 pc = (i >= 0 ? m_debugger_list->m_pc + i * 4 : cpu->get_pc()) & address_limits; const auto modifiers = QApplication::keyboardModifiers(); diff --git a/rpcs3/rpcs3qt/memory_viewer_panel.cpp b/rpcs3/rpcs3qt/memory_viewer_panel.cpp index fdc731a2fc..aa4d8b07c5 100644 --- a/rpcs3/rpcs3qt/memory_viewer_panel.cpp +++ b/rpcs3/rpcs3qt/memory_viewer_panel.cpp @@ -23,7 +23,7 @@ constexpr auto qstr = QString::fromStdString; memory_viewer_panel::memory_viewer_panel(QWidget* parent, u32 addr, const std::shared_ptr& cpu) : QDialog(parent) , m_addr(addr) - , m_type(!cpu || cpu->id_type() != 2 ? thread_type::ppu : thread_type::spu) + , m_type(!cpu || cpu->id_type() == 1 ? thread_type::ppu : thread_type::spu) , m_spu_shm(m_type == thread_type::spu ? static_cast(cpu.get())->shm : nullptr) , m_addr_mask(m_type == thread_type::spu ? SPU_LS_SIZE - 1 : ~0) {