diff --git a/Core/Config.cpp b/Core/Config.cpp index e01790a52..415b559d9 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -70,6 +70,7 @@ void CConfig::Load(const char *iniFileName) graphics->Get("SSAA", &SSAntiAliasing, 0); graphics->Get("VBO", &bUseVBO, false); graphics->Get("FrameSkip", &iFrameSkip, 0); + graphics->Get("UseMediaEngine", &bUseMediaEngine, false); #ifdef USING_GLES2 graphics->Get("AnisotropyLevel", &iAnisotropyLevel, 0); #else @@ -134,6 +135,7 @@ void CConfig::Save() graphics->Set("SSAA", SSAntiAliasing); graphics->Set("VBO", bUseVBO); graphics->Set("FrameSkip", iFrameSkip); + graphics->Set("UseMediaEngine", bUseMediaEngine); graphics->Set("AnisotropyLevel", iAnisotropyLevel); graphics->Set("VertexCache", bVertexCache); graphics->Set("FullScreen", bFullScreen); diff --git a/Core/Config.h b/Core/Config.h index 8468158d4..64410e4ca 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -59,6 +59,7 @@ public: bool bUseVBO; bool bStretchToDisplay; int iFrameSkip; // 0 = off; 1 = auto; (future: 2 = skip every 2nd frame; 3 = skip every 3rd frame etc). + bool bUseMediaEngine; int iWindowZoom; // for Windows bool SSAntiAliasing; //for Windows, too diff --git a/Core/HLE/sceMpeg.cpp b/Core/HLE/sceMpeg.cpp index c1afe5c0f..18911d68a 100644 --- a/Core/HLE/sceMpeg.cpp +++ b/Core/HLE/sceMpeg.cpp @@ -23,6 +23,7 @@ #include "sceKernelThread.h" #include "HLE.h" #include "../HW/MediaEngine.h" +#include "../../Core/Config.h" static bool useMediaEngine; @@ -519,6 +520,10 @@ int sceMpegAvcDecodeMode(u32 mpeg, u32 modeAddr) int sceMpegQueryStreamOffset(u32 mpeg, u32 bufferAddr, u32 offsetAddr) { + if (g_Config.bUseMediaEngine == false){ + WARN_LOG(HLE, "Media Engine disabled"); + return -1; + } MpegContext *ctx = getMpegCtx(mpeg); if (!ctx) { WARN_LOG(HLE, "sceMpegQueryStreamOffset(%08x, %08x, %08x): bad mpeg handle", mpeg, bufferAddr, offsetAddr);