VERY experimental Nintendo Switch 2 emulator
C++
Merge pull request #211 from linkmauve/master
bunneic0cd0fa78edc
diff --cc src/core/hle/kernel/thread.cppindex 35ff9a379f,9e2e15c8e2..cc70cbca71--- a/src/core/hle/kernel/thread.cpp+++ b/src/core/hle/kernel/thread.cpp@@@ -216,9 -216,9 +216,9 @@@ Handle ArbitrateHighestPriorityThread(u/// Arbitrate all threads currently waitingvoid ArbitrateAllThreads(u32 arbiter, u32 address) {-+// Iterate through threads, find highest priority thread that is waiting to be arbitrated...- for (const auto& handle : g_thread_queue) {+ for (const auto& handle : thread_queue) {// TODO(bunnei): Verify arbiter address...if (VerifyWait(handle, WAITTYPE_ARB, arbiter))@@@ -263,11 -263,11 +263,11 @@@ void SwitchContext(Thread* t)Thread* NextThread() {Handle next;Thread* cur = GetCurrentThread();-+if (cur && cur->IsRunning()) {- next = g_thread_ready_queue.pop_first_better(cur->current_priority);+ next = thread_ready_queue.pop_first_better(cur->current_priority);} else {- next = g_thread_ready_queue.pop_first();+ next = thread_ready_queue.pop_first();}if (next == 0) {return nullptr;