Add Ini for use Media Engine

Better to solve blackscreen and flash issue.
This commit is contained in:
sum2012 2013-03-03 23:04:36 +08:00
parent 3c640a0f1e
commit bfe8752a18
3 changed files with 8 additions and 0 deletions

View File

@ -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);

View File

@ -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

View File

@ -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);