mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-04 03:35:19 +02:00
Split GetPointer into two versions, to help with const correctness
This commit is contained in:
@@ -628,7 +628,7 @@ static int sceMpegQueryStreamOffset(u32 mpeg, u32 bufferAddr, u32 offsetAddr)
|
||||
DEBUG_LOG(ME, "sceMpegQueryStreamOffset(%08x, %08x, %08x)", mpeg, bufferAddr, offsetAddr);
|
||||
|
||||
// Kinda destructive, no?
|
||||
AnalyzeMpeg(Memory::GetPointer(bufferAddr), Memory::ValidSize(bufferAddr, 32768), ctx);
|
||||
AnalyzeMpeg(Memory::GetPointerWriteUnchecked(bufferAddr), Memory::ValidSize(bufferAddr, 32768), ctx);
|
||||
|
||||
if (ctx->mpegMagic != PSMF_MAGIC) {
|
||||
ERROR_LOG(ME, "sceMpegQueryStreamOffset: Bad PSMF magic");
|
||||
@@ -660,7 +660,7 @@ static u32 sceMpegQueryStreamSize(u32 bufferAddr, u32 sizeAddr)
|
||||
MpegContext ctx;
|
||||
ctx.mediaengine = 0;
|
||||
|
||||
AnalyzeMpeg(Memory::GetPointer(bufferAddr), Memory::ValidSize(bufferAddr, 32768), &ctx);
|
||||
AnalyzeMpeg(Memory::GetPointerWriteUnchecked(bufferAddr), Memory::ValidSize(bufferAddr, 32768), &ctx);
|
||||
|
||||
if (ctx.mpegMagic != PSMF_MAGIC) {
|
||||
ERROR_LOG(ME, "sceMpegQueryStreamSize: Bad PSMF magic");
|
||||
@@ -965,7 +965,7 @@ static bool decodePmpVideo(PSPPointer<SceMpegRingBuffer> ringbuffer, u32 pmpctxA
|
||||
for (int i = 0; i < pmp_nBlocks; i++){
|
||||
auto lli = PSPPointer<SceMpegLLI>::Create(pmp_videoSource);
|
||||
// add source block into pmpframes
|
||||
pmpframes->add(Memory::GetPointer(lli->pSrc), lli->iSize);
|
||||
pmpframes->add(Memory::GetPointerWrite(lli->pSrc), lli->iSize);
|
||||
// get next block
|
||||
pmp_videoSource += sizeof(SceMpegLLI);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user