Thread: Fix SetWaitSynchronizationOutput, SetWaitSynchronizationResult for this == GetCurrentThread()

This commit is contained in:
MerryMage 2016-05-28 19:46:45 +01:00
parent a58bc0919e
commit e33f17b046

View File

@ -579,12 +579,20 @@ void Reschedule() {
} }
void Thread::SetWaitSynchronizationResult(ResultCode result) { void Thread::SetWaitSynchronizationResult(ResultCode result) {
if (this == GetCurrentThread()) {
Core::g_app_core->SetReg(0, result.raw);
} else {
context.cpu_registers[0] = result.raw; context.cpu_registers[0] = result.raw;
} }
}
void Thread::SetWaitSynchronizationOutput(s32 output) { void Thread::SetWaitSynchronizationOutput(s32 output) {
if (this == GetCurrentThread()) {
Core::g_app_core->SetReg(1, output);
} else {
context.cpu_registers[1] = output; context.cpu_registers[1] = output;
} }
}
//////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////