Merge pull request #8436 from JosJuice/vi-wii-freeloader

VideoInterface: Don't crash when running Wii Freeloader
This commit is contained in:
Connor McLaughlin 2019-11-08 10:56:25 +10:00 committed by GitHub
commit 9db1ce8ef9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -747,7 +747,9 @@ static void LogField(FieldType field, u32 xfb_address)
static void BeginField(FieldType field, u64 ticks)
{
// Could we fit a second line of data in the stride?
// (Datel's Wii FreeLoaders are the only titles known to set WPL to 0)
bool potentially_interlaced_xfb =
m_PictureConfiguration.WPL != 0 &&
((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;