summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/hle/kernel/thread.cpp5
-rw-r--r--src/core/hle/kernel/thread.h1
-rw-r--r--src/yuzu/debugger/wait_tree.cpp24
3 files changed, 9 insertions, 21 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 3abe12810..7d1eb2c6e 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -88,10 +88,6 @@ void Thread::ResumeFromWait() {
88 // before actually resuming. We can ignore subsequent wakeups if the thread status has 88 // before actually resuming. We can ignore subsequent wakeups if the thread status has
89 // already been set to ThreadStatus::Ready. 89 // already been set to ThreadStatus::Ready.
90 return; 90 return;
91
92 case ThreadStatus::Running:
93 DEBUG_ASSERT_MSG(false, "Thread with object id {} has already resumed.", GetObjectId());
94 return;
95 case ThreadStatus::Dead: 91 case ThreadStatus::Dead:
96 // This should never happen, as threads must complete before being stopped. 92 // This should never happen, as threads must complete before being stopped.
97 DEBUG_ASSERT_MSG(false, "Thread with object id {} cannot be resumed because it's DEAD.", 93 DEBUG_ASSERT_MSG(false, "Thread with object id {} cannot be resumed because it's DEAD.",
@@ -260,7 +256,6 @@ void Thread::SetStatus(ThreadStatus new_status) {
260 256
261 switch (new_status) { 257 switch (new_status) {
262 case ThreadStatus::Ready: 258 case ThreadStatus::Ready:
263 case ThreadStatus::Running:
264 SetSchedulingStatus(ThreadSchedStatus::Runnable); 259 SetSchedulingStatus(ThreadSchedStatus::Runnable);
265 break; 260 break;
266 case ThreadStatus::Dormant: 261 case ThreadStatus::Dormant:
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h
index 20e86fb81..a75071e9b 100644
--- a/src/core/hle/kernel/thread.h
+++ b/src/core/hle/kernel/thread.h
@@ -72,7 +72,6 @@ enum ThreadProcessorId : s32 {
72}; 72};
73 73
74enum class ThreadStatus { 74enum class ThreadStatus {
75 Running, ///< Currently running
76 Ready, ///< Ready to run 75 Ready, ///< Ready to run
77 Paused, ///< Paused by SetThreadActivity or debug 76 Paused, ///< Paused by SetThreadActivity or debug
78 WaitHLEEvent, ///< Waiting for hle event to finish 77 WaitHLEEvent, ///< Waiting for hle event to finish
diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp
index 3439cb333..a20824719 100644
--- a/src/yuzu/debugger/wait_tree.cpp
+++ b/src/yuzu/debugger/wait_tree.cpp
@@ -25,7 +25,6 @@ namespace {
25 25
26constexpr std::array<std::array<Qt::GlobalColor, 2>, 10> WaitTreeColors{{ 26constexpr std::array<std::array<Qt::GlobalColor, 2>, 10> WaitTreeColors{{
27 {Qt::GlobalColor::darkGreen, Qt::GlobalColor::green}, 27 {Qt::GlobalColor::darkGreen, Qt::GlobalColor::green},
28 {Qt::GlobalColor::darkGreen, Qt::GlobalColor::green},
29 {Qt::GlobalColor::darkBlue, Qt::GlobalColor::cyan}, 28 {Qt::GlobalColor::darkBlue, Qt::GlobalColor::cyan},
30 {Qt::GlobalColor::lightGray, Qt::GlobalColor::lightGray}, 29 {Qt::GlobalColor::lightGray, Qt::GlobalColor::lightGray},
31 {Qt::GlobalColor::lightGray, Qt::GlobalColor::lightGray}, 30 {Qt::GlobalColor::lightGray, Qt::GlobalColor::lightGray},
@@ -239,9 +238,6 @@ QString WaitTreeThread::GetText() const {
239 const auto& thread = static_cast<const Kernel::Thread&>(object); 238 const auto& thread = static_cast<const Kernel::Thread&>(object);
240 QString status; 239 QString status;
241 switch (thread.GetStatus()) { 240 switch (thread.GetStatus()) {
242 case Kernel::ThreadStatus::Running:
243 status = tr("running");
244 break;
245 case Kernel::ThreadStatus::Ready: 241 case Kernel::ThreadStatus::Ready:
246 if (!thread.IsPaused()) { 242 if (!thread.IsPaused()) {
247 if (thread.WasRunning()) { 243 if (thread.WasRunning()) {
@@ -298,34 +294,32 @@ QColor WaitTreeThread::GetColor() const {
298 294
299 const auto& thread = static_cast<const Kernel::Thread&>(object); 295 const auto& thread = static_cast<const Kernel::Thread&>(object);
300 switch (thread.GetStatus()) { 296 switch (thread.GetStatus()) {
301 case Kernel::ThreadStatus::Running:
302 return QColor(WaitTreeColors[0][color_index]);
303 case Kernel::ThreadStatus::Ready: 297 case Kernel::ThreadStatus::Ready:
304 if (!thread.IsPaused()) { 298 if (!thread.IsPaused()) {
305 if (thread.WasRunning()) { 299 if (thread.WasRunning()) {
306 return QColor(WaitTreeColors[1][color_index]); 300 return QColor(WaitTreeColors[0][color_index]);
307 } else { 301 } else {
308 return QColor(WaitTreeColors[2][color_index]); 302 return QColor(WaitTreeColors[1][color_index]);
309 } 303 }
310 } else { 304 } else {
311 return QColor(WaitTreeColors[3][color_index]); 305 return QColor(WaitTreeColors[2][color_index]);
312 } 306 }
313 case Kernel::ThreadStatus::Paused: 307 case Kernel::ThreadStatus::Paused:
314 return QColor(WaitTreeColors[4][color_index]); 308 return QColor(WaitTreeColors[3][color_index]);
315 case Kernel::ThreadStatus::WaitHLEEvent: 309 case Kernel::ThreadStatus::WaitHLEEvent:
316 case Kernel::ThreadStatus::WaitIPC: 310 case Kernel::ThreadStatus::WaitIPC:
317 return QColor(WaitTreeColors[5][color_index]); 311 return QColor(WaitTreeColors[4][color_index]);
318 case Kernel::ThreadStatus::WaitSleep: 312 case Kernel::ThreadStatus::WaitSleep:
319 return QColor(WaitTreeColors[6][color_index]); 313 return QColor(WaitTreeColors[5][color_index]);
320 case Kernel::ThreadStatus::WaitSynch: 314 case Kernel::ThreadStatus::WaitSynch:
321 case Kernel::ThreadStatus::WaitMutex: 315 case Kernel::ThreadStatus::WaitMutex:
322 case Kernel::ThreadStatus::WaitCondVar: 316 case Kernel::ThreadStatus::WaitCondVar:
323 case Kernel::ThreadStatus::WaitArb: 317 case Kernel::ThreadStatus::WaitArb:
324 return QColor(WaitTreeColors[7][color_index]); 318 return QColor(WaitTreeColors[6][color_index]);
325 case Kernel::ThreadStatus::Dormant: 319 case Kernel::ThreadStatus::Dormant:
326 return QColor(WaitTreeColors[8][color_index]); 320 return QColor(WaitTreeColors[7][color_index]);
327 case Kernel::ThreadStatus::Dead: 321 case Kernel::ThreadStatus::Dead:
328 return QColor(WaitTreeColors[9][color_index]); 322 return QColor(WaitTreeColors[8][color_index]);
329 default: 323 default:
330 return WaitTreeItem::GetColor(); 324 return WaitTreeItem::GetColor();
331 } 325 }