mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Update result on non-buffer receive empty too.
This commit is contained in:
parent
2d1b2bc769
commit
a53c5d291c
1 changed files with 6 additions and 1 deletions
|
@ -477,7 +477,7 @@ int __KernelSendMsgPipe(MsgPipe *m, u32 sendBufAddr, u32 sendSize, int waitMode,
|
|||
{
|
||||
if (poll)
|
||||
{
|
||||
// Generally, result is not set to 0 in this case. But for a 0 size buffer in ASAP mode, it is.
|
||||
// Generally, result is not updated in this case. But for a 0 size buffer in ASAP mode, it is.
|
||||
if (Memory::IsValidAddress(resultAddr) && waitMode == SCE_KERNEL_MPW_ASAP)
|
||||
Memory::Write_U32(curSendAddr - sendBufAddr, resultAddr);
|
||||
return SCE_KERNEL_ERROR_MPP_FULL;
|
||||
|
@ -641,7 +641,12 @@ int __KernelReceiveMsgPipe(MsgPipe *m, u32 receiveBufAddr, u32 receiveSize, int
|
|||
if (receiveSize != 0 && (waitMode != SCE_KERNEL_MPW_ASAP || curReceiveAddr == receiveBufAddr))
|
||||
{
|
||||
if (poll)
|
||||
{
|
||||
// Generally, result is not updated in this case. But for a 0 size buffer in ASAP mode, it is.
|
||||
if (Memory::IsValidAddress(resultAddr) && waitMode == SCE_KERNEL_MPW_ASAP)
|
||||
Memory::Write_U32(curReceiveAddr - receiveBufAddr, resultAddr);
|
||||
return SCE_KERNEL_ERROR_MPP_EMPTY;
|
||||
}
|
||||
else
|
||||
{
|
||||
m->AddReceiveWaitingThread(__KernelGetCurThread(), curReceiveAddr, receiveSize, waitMode, resultAddr);
|
||||
|
|
Loading…
Add table
Reference in a new issue