summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorScott Mansell <phiren@gmail.com>2016-03-27 19:10:45 +1300
committerScott Mansell <phiren@gmail.com>2016-04-06 05:12:53 +1200
commit365baeccb4f9268c5f4d770c14f2ef7cf544788a (patch)
tree53fa4a44307e00042ca6775383b21ba6090defce /Source
parent3f079fb2c1e222da5b4f4ecd42b2afb2f1fd1291 (diff)
Only force progressive if we are currently in an interlaced video mode
The NES games on the Zelda Collecters Edition disk use a XFB which is only 256 pixels wide, but has a stide of 640 pixels. This fits our definition of a interlaced xfb, as a second line of data could fit in the extra space. The solution is to check that we are actually in a interlaced video mode before activating the force progressive hack.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/HW/VideoInterface.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/Core/Core/HW/VideoInterface.cpp b/Source/Core/Core/HW/VideoInterface.cpp
index 93075d316c..a191bd25f3 100644
--- a/Source/Core/Core/HW/VideoInterface.cpp
+++ b/Source/Core/Core/HW/VideoInterface.cpp
@@ -634,7 +634,11 @@ u32 GetTicksPerField()
static void BeginField(FieldType field)
{
- bool interlaced_xfb = ((m_PictureConfiguration.STD / m_PictureConfiguration.WPL)==2);
+ // Could we fit a second line of data in the stride?
+ bool potentially_interlaced_xfb = ((m_PictureConfiguration.STD / m_PictureConfiguration.WPL) == 2);
+ // Are there an odd number of half-lines per field (definition of interlaced video)
+ bool interlaced_video_mode = (GetHalfLinesPerEvenField() & 1) == 1;
+
u32 fbStride = m_PictureConfiguration.STD * 16;
u32 fbWidth = m_PictureConfiguration.WPL * 16;
u32 fbHeight = m_VerticalTimingRegister.ACV;
@@ -650,7 +654,7 @@ static void BeginField(FieldType field)
xfbAddr = GetXFBAddressTop();
}
- if (interlaced_xfb && g_ActiveConfig.bForceProgressive)
+ if (potentially_interlaced_xfb && interlaced_video_mode && g_ActiveConfig.bForceProgressive)
{
// Strictly speaking, in interlaced mode, we're only supposed to read
// half of the lines of the XFB, and use that to display a field; the