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
commit2ca36ac39477b5c6b415084d81a4cb54403282d2 (patch)
tree71a8fc9f6ab552fb242923372238f691caa4e3d6 /src/citra_qt/debugger/wait_tree.cpp
parentac8f05943b9682a2c4b69da8c6bdd39cfbcf883f (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")));
}