mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Start out with 0 written msgpipe bytes.
This commit is contained in:
parent
b06de35536
commit
8a5dadcf53
1 changed files with 5 additions and 1 deletions
|
@ -84,7 +84,7 @@ struct MsgPipeWaitingThread
|
|||
if (IsStillWaiting(waitID))
|
||||
{
|
||||
WriteCurrentTimeout(waitID);
|
||||
if (transferred != (u32)-1)
|
||||
if (transferred != (u32)-1 && transferredBytes.IsValid())
|
||||
*transferredBytes = transferred;
|
||||
__KernelResumeThreadFromWait(id, result);
|
||||
}
|
||||
|
@ -114,6 +114,10 @@ struct MsgPipe : public KernelObject
|
|||
void AddWaitingThread(std::vector<MsgPipeWaitingThread> &list, SceUID id, u32 addr, u32 size, int waitMode, u32 transferredBytesAddr, bool usePrio)
|
||||
{
|
||||
MsgPipeWaitingThread thread = { id, addr, size, size, waitMode, transferredBytesAddr };
|
||||
// Start out with 0 transferred bytes while waiting.
|
||||
if (thread.transferredBytes.IsValid())
|
||||
*thread.transferredBytes = 0;
|
||||
|
||||
if (usePrio)
|
||||
{
|
||||
for (std::vector<MsgPipeWaitingThread>::iterator it = list.begin(); it != list.end(); it++)
|
||||
|
|
Loading…
Add table
Reference in a new issue