From 17e64b75a56bc5c0013c9a0bd5800bf304a94377 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Mon, 29 Aug 2016 23:02:05 +1200 Subject: [PATCH] VideoInterface: Fix panic alert on interlaced fields. For some reason this was only showing up in video software. Not sure why. --- Source/Core/Core/HW/VideoInterface.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/HW/VideoInterface.cpp b/Source/Core/Core/HW/VideoInterface.cpp index e00de54111..4abed42657 100644 --- a/Source/Core/Core/HW/VideoInterface.cpp +++ b/Source/Core/Core/HW/VideoInterface.cpp @@ -678,10 +678,12 @@ static void BeginField(FieldType field) // has the first line. For the field with the second line, we // offset the xfb by (-stride_of_one_line) to get the start // address of the full xfb. - if (field == FieldType::FIELD_ODD && m_VBlankTimingOdd.PRB == m_VBlankTimingEven.PRB + 1) + if (field == FieldType::FIELD_ODD && m_VBlankTimingOdd.PRB == m_VBlankTimingEven.PRB + 1 && + xfbAddr) xfbAddr -= fbStride * 2; - if (field == FieldType::FIELD_EVEN && m_VBlankTimingOdd.PRB == m_VBlankTimingEven.PRB - 1) + if (field == FieldType::FIELD_EVEN && m_VBlankTimingOdd.PRB == m_VBlankTimingEven.PRB - 1 && + xfbAddr) xfbAddr -= fbStride * 2; }