aboutsummaryrefslogtreecommitdiff
path: root/src/citra_qt/debugger/wait_tree.cpp
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-01-08 14:12:03 -0500
committerbunnei <bunneidev@gmail.com>2018-01-08 21:12:51 -0500
commit1bbe9309daa96b5fbac7a2df5a2edcb17ab7a05c (patch)
tree71a8fc9f6ab552fb242923372238f691caa4e3d6 /src/citra_qt/debugger/wait_tree.cpp
parent2a3f8e8484fca54767c9874cc21f5985d2be1463 (diff)
Kernel: Properly keep track of mutex lock data in the guest memory. This fixes userland locking/unlocking.
Diffstat (limited to 'src/citra_qt/debugger/wait_tree.cpp')
-rw-r--r--src/citra_qt/debugger/wait_tree.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/citra_qt/debugger/wait_tree.cpp b/src/citra_qt/debugger/wait_tree.cpp
index 8c244b6b2c..ebcc02894c 100644
--- a/src/citra_qt/debugger/wait_tree.cpp
+++ b/src/citra_qt/debugger/wait_tree.cpp
@@ -257,10 +257,9 @@ std::vector<std::unique_ptr<WaitTreeItem>> WaitTreeMutex::GetChildren() const {
std::vector<std::unique_ptr<WaitTreeItem>> list(WaitTreeWaitObject::GetChildren());
const auto& mutex = static_cast<const Kernel::Mutex&>(object);
- if (mutex.lock_count) {
- list.push_back(
- std::make_unique<WaitTreeText>(tr("locked %1 times by thread:").arg(mutex.lock_count)));
- list.push_back(std::make_unique<WaitTreeThread>(*mutex.holding_thread));
+ if (mutex.GetHasWaiters()) {
+ list.push_back(std::make_unique<WaitTreeText>(tr("locked by thread:")));
+ list.push_back(std::make_unique<WaitTreeThread>(*mutex.GetHoldingThread()));
} else {
list.push_back(std::make_unique<WaitTreeText>(tr("free")));
}