Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #14374 from unknownbrackets/rtc-cleanup
Rtc: Cleanup and simplify date struct handling
  • Loading branch information
hrydgard committed Apr 12, 2021
2 parents 0328a0d + f3f5b2e commit 6553b0f
Show file tree
Hide file tree
Showing 3 changed files with 144 additions and 240 deletions.
7 changes: 3 additions & 4 deletions Core/HLE/sceKernelMbx.cpp
Expand Up @@ -423,11 +423,10 @@ int sceKernelSendMbx(SceUID id, u32 packetAddr)
bool inserted = false;
if (m->nmb.attr & SCE_KERNEL_MBA_MSPRI)
{
NativeMbxPacket p;
for (int i = 0, n = m->nmb.numMessages; i < n; i++)
{
Memory::ReadStructUnchecked<NativeMbxPacket>(next, &p);
if (addPacket->priority < p.priority)
auto p = PSPPointer<NativeMbxPacket>::Create(next);
if (addPacket->priority < p->priority)
{
if (i == 0)
m->AddFirstMessage(prev, packetAddr);
Expand All @@ -438,7 +437,7 @@ int sceKernelSendMbx(SceUID id, u32 packetAddr)
}

prev = next;
next = Memory::Read_U32(next);
next = p->next;
}
}
if (!inserted)
Expand Down
5 changes: 2 additions & 3 deletions Core/HLE/sceMpeg.cpp
Expand Up @@ -962,11 +962,10 @@ static bool decodePmpVideo(PSPPointer<SceMpegRingBuffer> ringbuffer, u32 pmpctxA
pmpframes = new H264Frames;

// joint all blocks into H264Frames
SceMpegLLI lli;
for (int i = 0; i < pmp_nBlocks; i++){
Memory::ReadStructUnchecked(pmp_videoSource, &lli);
auto lli = PSPPointer<SceMpegLLI>::Create(pmp_videoSource);
// add source block into pmpframes
pmpframes->add(Memory::GetPointer(lli.pSrc), lli.iSize);
pmpframes->add(Memory::GetPointer(lli->pSrc), lli->iSize);
// get next block
pmp_videoSource += sizeof(SceMpegLLI);
}
Expand Down

0 comments on commit 6553b0f

Please sign in to comment.