summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/yuzu/debugger/wait_tree.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp
index f05c98cc3..a5da98d23 100644
--- a/src/yuzu/debugger/wait_tree.cpp
+++ b/src/yuzu/debugger/wait_tree.cpp
@@ -51,13 +51,21 @@ std::size_t WaitTreeItem::Row() const {
}
std::vector<std::unique_ptr<WaitTreeThread>> WaitTreeItem::MakeThreadItemList() {
- const auto& threads = Core::System::GetInstance().Scheduler(0)->GetThreadList();
std::vector<std::unique_ptr<WaitTreeThread>> item_list;
- item_list.reserve(threads.size());
- for (std::size_t i = 0; i < threads.size(); ++i) {
- item_list.push_back(std::make_unique<WaitTreeThread>(*threads[i]));
- item_list.back()->row = i;
- }
+ std::size_t row = 0;
+ auto add_threads = [&](const std::vector<Kernel::SharedPtr<Kernel::Thread>>& threads) {
+ for (std::size_t i = 0; i < threads.size(); ++i) {
+ item_list.push_back(std::make_unique<WaitTreeThread>(*threads[i]));
+ item_list.back()->row = row;
+ ++row;
+ }
+ };
+
+ add_threads(Core::System::GetInstance().Scheduler(0)->GetThreadList());
+ add_threads(Core::System::GetInstance().Scheduler(1)->GetThreadList());
+ add_threads(Core::System::GetInstance().Scheduler(2)->GetThreadList());
+ add_threads(Core::System::GetInstance().Scheduler(3)->GetThreadList());
+
return item_list;
}