From 437afbbbf3cab3302efb1bc568d9e4d6ebe4111b Mon Sep 17 00:00:00 2001 From: Akash Date: Thu, 13 Oct 2016 17:12:05 +0530 Subject: [PATCH] GSDX-PCRTC: Move Saturation hack to displayrect() Fixes custom resolution scaling on Tribes aerial assault. --- plugins/GSdx/GSState.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/plugins/GSdx/GSState.cpp b/plugins/GSdx/GSState.cpp index c33c9ef57a..5278b5d85a 100644 --- a/plugins/GSdx/GSState.cpp +++ b/plugins/GSdx/GSState.cpp @@ -420,6 +420,12 @@ GSVector4i GSState::GetDisplayRect(int i) height /= 2; } + // Limit games to standard NTSC resolutions. games with 512X512 (PAL resolution) on NTSC video mode produces black border on the bottom. + // 512 X 448 is the resolution generally used by NTSC, saturating the height value seems to get rid of the black borders. + // Though it's quite a bad hack as it affects binaries which are patched to run on a non-native video mode. + if (videomode == GSVideoMode::NTSC && height > 448 && width < 640 && m_NTSC_Saturation) + height = 448; + // Set up the display rectangle based on the values obtained from DISPLAY registers GSVector4i rectangle; rectangle.left = m_regs->DISP[i].DISPLAY.DX / magnification.x; @@ -438,17 +444,10 @@ GSVector4i GSState::GetFrameRect(int i) if (i < 0) i = IsEnabled(1) ? 1 : 0; GSVector4i rectangle = GetDisplayRect(i); - GSVideoMode videomode = GetVideoMode(); int w = rectangle.width(); int h = rectangle.height(); -// Limit games to standard NTSC resolutions. games with 512X512 (PAL resolution) on NTSC video mode produces black border on the bottom. -// 512 X 448 is the resolution generally used by NTSC, saturating the height value seems to get rid of the black borders. -// Though it's quite a bad hack as it affects binaries which are patched to run on a non-native video mode. - if (videomode == GSVideoMode::NTSC && h > 448 && w < 640 && m_NTSC_Saturation) - h = 448; - if (isinterlaced() && m_regs->SMODE2.FFMD && h > 1) h >>= 1;