SVC: Fixed SleepThread.

It will now properly wait the specified number of nanoseconds and then wake up the thread.
This commit is contained in:
Subv 2015-01-07 16:40:08 -05:00
parent 91d96840ea
commit dfc440785a
3 changed files with 43 additions and 8 deletions

View file

@ -344,6 +344,10 @@ static void SleepThread(s64 nanoseconds) {
// Sleep current thread and check for next thread to schedule
Kernel::WaitCurrentThread(WAITTYPE_SLEEP);
// Create an event to wake the thread up after the specified nanosecond delay has passed
Kernel::WakeThreadAfterDelay(Kernel::GetCurrentThreadHandle(), nanoseconds);
HLE::Reschedule(__func__);
}