From ca78dd4e6d507c1866157b11abef075fd3eb1f5b Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 22 Jun 2013 08:36:31 -0700 Subject: [PATCH] Eat cycles in sceMpegRingbufferAvailableSize(). Some games call this in a loop, so it affects perf. And, this eats quite a few cycles, implying it does a lot more work than I thought it did. --- Core/HLE/sceMpeg.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Core/HLE/sceMpeg.cpp b/Core/HLE/sceMpeg.cpp index 305b535df2..1464082f95 100644 --- a/Core/HLE/sceMpeg.cpp +++ b/Core/HLE/sceMpeg.cpp @@ -873,6 +873,7 @@ int sceMpegRingbufferAvailableSize(u32 ringbufferAddr) DEBUG_LOG(HLE, "%i=sceMpegRingbufferAvailableSize(%08x)", ringbuffer.packetsFree, ringbufferAddr); MpegContext *ctx = getMpegCtx(ringbuffer.mpeg); int result = std::min(ringbuffer.packetsFree, ctx->mediaengine->getRemainSize() / 2048); + hleEatCycles(2020); return ringbuffer.packetsFree; }