diff options
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 492c821e3..9dea995f4 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -591,8 +591,12 @@ void Reschedule() { | |||
| 591 | 591 | ||
| 592 | HLE::DoneRescheduling(); | 592 | HLE::DoneRescheduling(); |
| 593 | 593 | ||
| 594 | // Don't bother switching to the same thread | 594 | // Don't bother switching to the same thread. |
| 595 | if (next == cur) | 595 | // But if the thread was waiting on objects, we still need to switch it |
| 596 | // to perform PC modification, change state to RUNNING, etc. | ||
| 597 | // This occurs in the case when an object the thread is waiting on immediately wakes up | ||
| 598 | // the current thread before Reschedule() is called. | ||
| 599 | if (next == cur && (next == nullptr || next->waitsynch_waited == false)) | ||
| 596 | return; | 600 | return; |
| 597 | 601 | ||
| 598 | if (cur && next) { | 602 | if (cur && next) { |