Merge pull request #4224 from FearlessTobi/port-1310
Port #734 and #1310 from yuzu: Changes to Thread-related enums
This commit is contained in:
commit
f05740a5fd
13 changed files with 126 additions and 124 deletions
|
@ -145,32 +145,32 @@ QString WaitTreeThread::GetText() const {
|
|||
const auto& thread = static_cast<const Kernel::Thread&>(object);
|
||||
QString status;
|
||||
switch (thread.status) {
|
||||
case THREADSTATUS_RUNNING:
|
||||
case Kernel::ThreadStatus::Running:
|
||||
status = tr("running");
|
||||
break;
|
||||
case THREADSTATUS_READY:
|
||||
case Kernel::ThreadStatus::Ready:
|
||||
status = tr("ready");
|
||||
break;
|
||||
case THREADSTATUS_WAIT_ARB:
|
||||
case Kernel::ThreadStatus::WaitArb:
|
||||
status = tr("waiting for address 0x%1").arg(thread.wait_address, 8, 16, QLatin1Char('0'));
|
||||
break;
|
||||
case THREADSTATUS_WAIT_SLEEP:
|
||||
case Kernel::ThreadStatus::WaitSleep:
|
||||
status = tr("sleeping");
|
||||
break;
|
||||
case THREADSTATUS_WAIT_IPC:
|
||||
case Kernel::ThreadStatus::WaitIPC:
|
||||
status = tr("waiting for IPC response");
|
||||
break;
|
||||
case THREADSTATUS_WAIT_SYNCH_ALL:
|
||||
case THREADSTATUS_WAIT_SYNCH_ANY:
|
||||
case Kernel::ThreadStatus::WaitSynchAll:
|
||||
case Kernel::ThreadStatus::WaitSynchAny:
|
||||
status = tr("waiting for objects");
|
||||
break;
|
||||
case THREADSTATUS_WAIT_HLE_EVENT:
|
||||
case Kernel::ThreadStatus::WaitHleEvent:
|
||||
status = tr("waiting for HLE return");
|
||||
break;
|
||||
case THREADSTATUS_DORMANT:
|
||||
case Kernel::ThreadStatus::Dormant:
|
||||
status = tr("dormant");
|
||||
break;
|
||||
case THREADSTATUS_DEAD:
|
||||
case Kernel::ThreadStatus::Dead:
|
||||
status = tr("dead");
|
||||
break;
|
||||
}
|
||||
|
@ -183,23 +183,23 @@ QString WaitTreeThread::GetText() const {
|
|||
QColor WaitTreeThread::GetColor() const {
|
||||
const auto& thread = static_cast<const Kernel::Thread&>(object);
|
||||
switch (thread.status) {
|
||||
case THREADSTATUS_RUNNING:
|
||||
case Kernel::ThreadStatus::Running:
|
||||
return QColor(Qt::GlobalColor::darkGreen);
|
||||
case THREADSTATUS_READY:
|
||||
case Kernel::ThreadStatus::Ready:
|
||||
return QColor(Qt::GlobalColor::darkBlue);
|
||||
case THREADSTATUS_WAIT_ARB:
|
||||
case Kernel::ThreadStatus::WaitArb:
|
||||
return QColor(Qt::GlobalColor::darkRed);
|
||||
case THREADSTATUS_WAIT_SLEEP:
|
||||
case Kernel::ThreadStatus::WaitSleep:
|
||||
return QColor(Qt::GlobalColor::darkYellow);
|
||||
case THREADSTATUS_WAIT_IPC:
|
||||
case Kernel::ThreadStatus::WaitIPC:
|
||||
return QColor(Qt::GlobalColor::darkCyan);
|
||||
case THREADSTATUS_WAIT_SYNCH_ALL:
|
||||
case THREADSTATUS_WAIT_SYNCH_ANY:
|
||||
case THREADSTATUS_WAIT_HLE_EVENT:
|
||||
case Kernel::ThreadStatus::WaitSynchAll:
|
||||
case Kernel::ThreadStatus::WaitSynchAny:
|
||||
case Kernel::ThreadStatus::WaitHleEvent:
|
||||
return QColor(Qt::GlobalColor::red);
|
||||
case THREADSTATUS_DORMANT:
|
||||
case Kernel::ThreadStatus::Dormant:
|
||||
return QColor(Qt::GlobalColor::darkCyan);
|
||||
case THREADSTATUS_DEAD:
|
||||
case Kernel::ThreadStatus::Dead:
|
||||
return QColor(Qt::GlobalColor::gray);
|
||||
default:
|
||||
return WaitTreeItem::GetColor();
|
||||
|
@ -213,16 +213,16 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeThread::GetChildren() const {
|
|||
|
||||
QString processor;
|
||||
switch (thread.processor_id) {
|
||||
case ThreadProcessorId::THREADPROCESSORID_DEFAULT:
|
||||
case Kernel::ThreadProcessorId::ThreadProcessorIdDefault:
|
||||
processor = tr("default");
|
||||
break;
|
||||
case ThreadProcessorId::THREADPROCESSORID_ALL:
|
||||
case Kernel::ThreadProcessorId::ThreadProcessorIdAll:
|
||||
processor = tr("all");
|
||||
break;
|
||||
case ThreadProcessorId::THREADPROCESSORID_0:
|
||||
case Kernel::ThreadProcessorId::ThreadProcessorId0:
|
||||
processor = tr("AppCore");
|
||||
break;
|
||||
case ThreadProcessorId::THREADPROCESSORID_1:
|
||||
case Kernel::ThreadProcessorId::ThreadProcessorId1:
|
||||
processor = tr("SysCore");
|
||||
break;
|
||||
default:
|
||||
|
@ -243,9 +243,9 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeThread::GetChildren() const {
|
|||
} else {
|
||||
list.push_back(std::make_unique<WaitTreeMutexList>(thread.held_mutexes));
|
||||
}
|
||||
if (thread.status == THREADSTATUS_WAIT_SYNCH_ANY ||
|
||||
thread.status == THREADSTATUS_WAIT_SYNCH_ALL ||
|
||||
thread.status == THREADSTATUS_WAIT_HLE_EVENT) {
|
||||
if (thread.status == Kernel::ThreadStatus::WaitSynchAny ||
|
||||
thread.status == Kernel::ThreadStatus::WaitSynchAll ||
|
||||
thread.status == Kernel::ThreadStatus::WaitHleEvent) {
|
||||
list.push_back(std::make_unique<WaitTreeObjectList>(thread.wait_objects,
|
||||
thread.IsSleepingOnWaitAll()));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue