Core: Correct HLE Event Callbacks and other issues.

This commit is contained in:
Fernando Sahmkow 2020-03-03 13:02:50 -04:00
parent de5b521c09
commit 75e10578f1
5 changed files with 40 additions and 38 deletions

View file

@ -333,17 +333,16 @@ static ResultCode SendSyncRequest(Core::System& system, Handle handle) {
thread->SetStatus(ThreadStatus::WaitIPC);
session->SendSyncRequest(SharedFrom(thread), system.Memory());
}
ResultCode result = thread->GetSignalingResult();
if (thread->HasHLECallback()) {
Handle event_handle = thread->GetHLETimeEvent();
if (event_handle != InvalidHandle) {
auto& time_manager = system.Kernel().TimeManager();
time_manager.UnscheduleTimeEvent(event_handle);
}
thread->InvokeHLECallback(ThreadWakeupReason::Timeout, SharedFrom(thread), nullptr, 0);
thread->InvokeHLECallback(SharedFrom(thread));
}
return result;
return RESULT_SUCCESS;
}
static ResultCode SendSyncRequest32(Core::System& system, Handle handle) {