SVC: Fixed SleepThread.
It will now properly wait the specified number of nanoseconds and then wake up the thread.
This commit is contained in:
parent
91d96840ea
commit
dfc440785a
3 changed files with 43 additions and 8 deletions
|
@ -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__);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue