From cdd14b03e5c8e29bc6cd11bbde0ef726d2f166ce Mon Sep 17 00:00:00 2001 From: bunnei Date: Wed, 20 Jan 2021 13:42:27 -0800 Subject: hle: kernel: Recode implementation of KThread to be more accurate. --- src/yuzu/debugger/wait_tree.cpp | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'src/yuzu/debugger/wait_tree.cpp') diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp index d6354b01d..cbec692f9 100644 --- a/src/yuzu/debugger/wait_tree.cpp +++ b/src/yuzu/debugger/wait_tree.cpp @@ -235,12 +235,8 @@ QString WaitTreeThread::GetText() const { QString status; switch (thread.GetState()) { case Kernel::ThreadState::Runnable: - if (!thread.IsPaused()) { - if (thread.WasRunning()) { - status = tr("running"); - } else { - status = tr("ready"); - } + if (!thread.IsSuspended()) { + status = tr("runnable"); } else { status = tr("paused"); } @@ -295,12 +291,8 @@ QColor WaitTreeThread::GetColor() const { const auto& thread = static_cast(object); switch (thread.GetState()) { case Kernel::ThreadState::Runnable: - if (!thread.IsPaused()) { - if (thread.WasRunning()) { - return QColor(WaitTreeColors[0][color_index]); - } else { - return QColor(WaitTreeColors[1][color_index]); - } + if (!thread.IsSuspended()) { + return QColor(WaitTreeColors[0][color_index]); } else { return QColor(WaitTreeColors[2][color_index]); } @@ -334,18 +326,18 @@ std::vector> WaitTreeThread::GetChildren() const { const auto& thread = static_cast(object); QString processor; - switch (thread.GetProcessorID()) { + switch (thread.GetActiveCore()) { case Kernel::Svc::IdealCoreUseProcessValue: processor = tr("ideal"); break; default: - processor = tr("core %1").arg(thread.GetProcessorID()); + processor = tr("core %1").arg(thread.GetActiveCore()); break; } list.push_back(std::make_unique(tr("processor = %1").arg(processor))); - list.push_back( - std::make_unique(tr("ideal core = %1").arg(thread.GetIdealCore()))); + list.push_back(std::make_unique( + tr("ideal core = %1").arg(thread.GetIdealCoreForDebugging()))); list.push_back(std::make_unique( tr("affinity mask = %1").arg(thread.GetAffinityMask().GetAffinityMask()))); list.push_back(std::make_unique(tr("thread id = %1").arg(thread.GetThreadID()))); -- cgit v1.2.3