mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-01-27 00:04:45 +00:00
Merge pull request #2534 from oioitff/mpeg-fix
Add option to enable Linear Filtering only for CGs.
This commit is contained in:
commit
9ec27e4f92
@ -100,6 +100,7 @@ void Config::Load(const char *iniFileName)
|
||||
graphics->Get("HardwareTransform", &bHardwareTransform, true);
|
||||
graphics->Get("NearestFiltering", &bNearestFiltering, false);
|
||||
graphics->Get("LinearFiltering", &bLinearFiltering, false);
|
||||
graphics->Get("LinearFilteringCG", &bLinearFilteringCG, false);
|
||||
graphics->Get("SSAA", &SSAntiAliasing, 0);
|
||||
graphics->Get("VBO", &bUseVBO, false);
|
||||
graphics->Get("FrameSkip", &iFrameSkip, 0);
|
||||
@ -216,6 +217,7 @@ void Config::Save()
|
||||
graphics->Set("HardwareTransform", bHardwareTransform);
|
||||
graphics->Set("NearestFiltering", bNearestFiltering);
|
||||
graphics->Set("LinearFiltering", bLinearFiltering);
|
||||
graphics->Set("LinearFilteringCG", bLinearFilteringCG);
|
||||
graphics->Set("SSAA", SSAntiAliasing);
|
||||
graphics->Set("VBO", bUseVBO);
|
||||
graphics->Set("FrameSkip", iFrameSkip);
|
||||
|
@ -65,6 +65,7 @@ public:
|
||||
bool bBufferedRendering;
|
||||
bool bNearestFiltering;
|
||||
bool bLinearFiltering;
|
||||
bool bLinearFilteringCG;
|
||||
bool bUseVBO;
|
||||
#ifdef BLACKBERRY
|
||||
bool bPartialStretch;
|
||||
|
@ -43,6 +43,8 @@ static const int TPSM_PIXEL_STORAGE_MODE_16BIT_ABGR5551 = 0x01;
|
||||
static const int TPSM_PIXEL_STORAGE_MODE_16BIT_ABGR4444 = 0x02;
|
||||
static const int TPSM_PIXEL_STORAGE_MODE_32BIT_ABGR8888 = 0x03;
|
||||
|
||||
int g_iNumVideos = 0;
|
||||
|
||||
#ifdef USE_FFMPEG
|
||||
static AVPixelFormat getSwsFormat(int pspFormat)
|
||||
{
|
||||
@ -95,10 +97,12 @@ MediaEngine::MediaEngine(): m_pdata(0) {
|
||||
m_isAudioEnd = false;
|
||||
m_bufSize = 0x2000;
|
||||
m_mpegheaderReadPos = 0;
|
||||
g_iNumVideos++;
|
||||
}
|
||||
|
||||
MediaEngine::~MediaEngine() {
|
||||
closeMedia();
|
||||
g_iNumVideos--;
|
||||
}
|
||||
|
||||
void MediaEngine::closeMedia() {
|
||||
|
@ -44,6 +44,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern int g_iNumVideos;
|
||||
|
||||
static const char tex_fs[] =
|
||||
"#ifdef GL_ES\n"
|
||||
@ -245,7 +246,7 @@ void FramebufferManager::DrawPixels(const u8 *framebuf, int pixelFormat, int lin
|
||||
}
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D,drawPixelsTex_);
|
||||
if (g_Config.bLinearFiltering)
|
||||
if (g_Config.bLinearFiltering || (g_Config.bLinearFilteringCG && g_iNumVideos))
|
||||
{
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
}
|
||||
|
@ -38,6 +38,8 @@
|
||||
// Not used in lowmem mode.
|
||||
#define TEXTURE_SECOND_KILL_AGE 100
|
||||
|
||||
extern int g_iNumVideos;
|
||||
|
||||
u32 RoundUpToPowerOf2(u32 v)
|
||||
{
|
||||
v--;
|
||||
@ -509,7 +511,7 @@ void TextureCache::UpdateSamplingParams(TexCacheEntry &entry, bool force) {
|
||||
}
|
||||
}
|
||||
|
||||
if (g_Config.bLinearFiltering && !gstate.isColorTestEnabled()) {
|
||||
if ((g_Config.bLinearFiltering || (g_Config.bLinearFilteringCG && g_iNumVideos)) && !gstate.isColorTestEnabled()) {
|
||||
magFilt |= 1;
|
||||
minFilt |= 1;
|
||||
}
|
||||
|
@ -60,6 +60,7 @@ void GameSettingsScreen::CreateViews() {
|
||||
tabHolder->AddTab("Graphics", graphicsSettingsScroll);
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bNearestFiltering, gs->T("Force Nearest Filtering")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bLinearFiltering, gs->T("Force Linear Filtering")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bLinearFilteringCG, gs->T("Linear Filtering (CG)")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bStretchToDisplay, gs->T("Stretch to Display")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bBufferedRendering, gs->T("Buffered Rendering")));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bDisplayFramebuffer, gs->T("Display Raw Framebuffer")));
|
||||
|
@ -863,6 +863,7 @@ void GraphicsScreenP2::render() {
|
||||
if ( UICheckBox(GEN_ID, x, y += stride, gs->T("Force Linear Filtering"), ALIGN_TOPLEFT, &g_Config.bLinearFiltering) ) {
|
||||
g_Config.bNearestFiltering = false; // and vice versa
|
||||
}
|
||||
UICheckBox(GEN_ID, x, y += stride, gs->T("Linear Filtering (CG)"), ALIGN_TOPLEFT, &g_Config.bLinearFilteringCG);
|
||||
|
||||
bool AnisotropicFiltering = g_Config.iAnisotropyLevel != 0;
|
||||
UICheckBox(GEN_ID, x, y += stride, gs->T("Anisotropic Filtering"), ALIGN_TOPLEFT, &AnisotropicFiltering);
|
||||
|
@ -745,6 +745,9 @@ namespace MainWindow
|
||||
g_Config.bNearestFiltering = false;
|
||||
g_Config.bLinearFiltering = !g_Config.bLinearFiltering;
|
||||
break;
|
||||
case ID_OPTIONS_LINEARFILTERING_CG:
|
||||
g_Config.bLinearFilteringCG = !g_Config.bLinearFilteringCG;
|
||||
break;
|
||||
case ID_OPTIONS_TOPMOST:
|
||||
g_Config.bTopMost = !g_Config.bTopMost;
|
||||
W32Util::MakeTopMost(hWnd, g_Config.bTopMost);
|
||||
@ -902,6 +905,7 @@ namespace MainWindow
|
||||
CHECKITEM(ID_OPTIONS_FASTMEMORY, g_Config.bFastMemory);
|
||||
CHECKITEM(ID_OPTIONS_NEARESTFILTERING, g_Config.bNearestFiltering);
|
||||
CHECKITEM(ID_OPTIONS_LINEARFILTERING, g_Config.bLinearFiltering);
|
||||
CHECKITEM(ID_OPTIONS_LINEARFILTERING_CG, g_Config.bLinearFilteringCG);
|
||||
CHECKITEM(ID_OPTIONS_SIMPLE2XSSAA, g_Config.SSAntiAliasing);
|
||||
CHECKITEM(ID_OPTIONS_STRETCHDISPLAY, g_Config.bStretchToDisplay);
|
||||
CHECKITEM(ID_EMULATION_RUNONLOAD, g_Config.bAutoRun);
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user