diff --git a/src/xenia/kernel/xam_content.cc b/src/xenia/kernel/xam_content.cc index bc8a6675f..3abd40fb6 100644 --- a/src/xenia/kernel/xam_content.cc +++ b/src/xenia/kernel/xam_content.cc @@ -76,7 +76,7 @@ SHIM_CALL XamShowDeviceSelectorUI_shim( XELOGD( "XamShowDeviceSelectorUI(%.8X, %.8X, %.8X, %.8X, %.8X, %.8X)", arg0, arg1, arg2, arg3, arg4, arg5); - SHIM_SET_RETURN_32(997); + SHIM_SET_RETURN_32(X_ERROR_IO_PENDING); } diff --git a/src/xenia/kernel/xam_user.cc b/src/xenia/kernel/xam_user.cc index 15bf258df..4524d743a 100644 --- a/src/xenia/kernel/xam_user.cc +++ b/src/xenia/kernel/xam_user.cc @@ -283,13 +283,19 @@ SHIM_CALL XamWriteGamerTile_shim( uint32_t arg2 = SHIM_GET_ARG_32(2); uint32_t arg3 = SHIM_GET_ARG_32(3); uint32_t arg4 = SHIM_GET_ARG_32(4); - uint32_t arg5 = SHIM_GET_ARG_32(5); + uint32_t overlapped_ptr = SHIM_GET_ARG_32(5); XELOGD( "XamWriteGamerTile(%.8X, %.8X, %.8X, %.8X, %.8X, %.8X)", - arg0, arg1, arg2, arg3, arg4, arg5); + arg0, arg1, arg2, arg3, arg4, overlapped_ptr); - SHIM_SET_RETURN_32(0x3E5); + if (overlapped_ptr) { + state->CompleteOverlappedImmediate(overlapped_ptr, X_ERROR_SUCCESS); + SHIM_SET_RETURN_32(X_ERROR_IO_PENDING); + } + else { + SHIM_SET_RETURN_32(X_ERROR_SUCCESS); + } } diff --git a/src/xenia/xbox.h b/src/xenia/xbox.h index 633477a9c..52bc8f31e 100644 --- a/src/xenia/xbox.h +++ b/src/xenia/xbox.h @@ -76,6 +76,7 @@ typedef uint32_t X_RESULT; #define X_ERROR_NOT_FOUND X_HRESULT_FROM_WIN32(0x00000490L) #define X_ERROR_CANCELLED X_HRESULT_FROM_WIN32(0x000004C7L) #define X_ERROR_NO_SUCH_USER X_HRESULT_FROM_WIN32(0x00000525L) +#define X_ERROR_FUNCTION_FAILED X_HRESULT_FROM_WIN32(0x0000065BL) #define X_ERROR_EMPTY X_HRESULT_FROM_WIN32(0x000010D2L) // MEM_*, used by NtAllocateVirtualMemory