Skip to content

Commit

Permalink
Set length in overlapped completion to -1 when not success.
Browse files Browse the repository at this point in the history
  • Loading branch information
gibbed committed Jun 20, 2016
1 parent 8d00abe commit e7f5d3e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/xenia/kernel/kernel_state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e7f5d3e

Please sign in to comment.