Set length in overlapped completion to -1 when not success.

This commit is contained in:
gibbed 2016-06-20 17:13:31 -05:00
parent 8d00abe10f
commit e7f5d3e7d4
1 changed files with 5 additions and 1 deletions

View File

@ -608,7 +608,11 @@ void KernelState::CompleteOverlappedEx(uint32_t overlapped_ptr, X_RESULT result,
void KernelState::CompleteOverlappedImmediate(uint32_t overlapped_ptr,
X_RESULT result) {
CompleteOverlappedImmediateEx(overlapped_ptr, result, result, 0);
// TODO(gibbed): there are games that check 'length' of overlapped as
// an indication of success. WTF?
// Setting length to -1 when not success seems to be helping.
uint32_t length = !result ? 0 : 0xFFFFFFFF;
CompleteOverlappedImmediateEx(overlapped_ptr, result, result, length);
}
void KernelState::CompleteOverlappedImmediateEx(uint32_t overlapped_ptr,