From dbc1320923fb69dffce1b8ebfdfbed070ffddf69 Mon Sep 17 00:00:00 2001
From: Subv <subv2112@gmail.com>
Date: Mon, 11 May 2015 19:38:10 -0500
Subject: [PATCH] Core/Scheduling: Prepare the new priority in the thread queue
 when svcSetPriority is called

---
 src/core/hle/kernel/thread.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 957cbdfee1..0503e50895 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -439,6 +439,8 @@ void Thread::SetPriority(s32 priority) {
     // If thread was ready, adjust queues
     if (status == THREADSTATUS_READY)
         ready_queue.move(this, current_priority, priority);
+    else
+        ready_queue.prepare(priority);
 
     nominal_priority = current_priority = priority;
 }
-- 
GitLab