VERY experimental Nintendo Switch 2 emulator
C++
hle: kernel: KScheduler: Ensure dummy threads are never scheduled.
bunneif1e06f984d17
diff --git a/src/core/hle/kernel/k_scheduler.cpp b/src/core/hle/kernel/k_scheduler.cppindex f900b2e7a0..5d39a1d4af 100644--- a/src/core/hle/kernel/k_scheduler.cpp+++ b/src/core/hle/kernel/k_scheduler.cpp@@ -739,6 +739,11 @@ void KScheduler::ScheduleImpl() {next_thread = idle_thread;}+ // We never want to schedule a dummy thread, as these are only used by host threads for locking.+ if (next_thread->GetThreadType() == ThreadType::Dummy) {+ next_thread = idle_thread;+ }+// If we're not actually switching thread, there's nothing to do.if (next_thread == current_thread.load()) {previous_thread->EnableDispatch();