summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2019-10-27 10:49:50 +0100
committerJosJuice <josjuice@gmail.com>2019-10-27 15:46:33 +0100
commit090f04e01c022d4bf9e643efaf61a347b3935eb3 (patch)
treebc1e967fcded35138dd571dd89c06d69ef0615b7 /Source
parenta825e7e09f8a39772b10c83db5322dc88e0f591f (diff)
VideoInterface: Don't crash when running Wii Freeloader
Datel's Wii Freeloaders set m_PictureConfiguration.WPL to 0 for a while. Not sure if the fix in this commit is a proper fix or just a hack, since I'm not very familiar with this code. With this change, it's possible to run a Wii Freeloader if you are running an old enough version of the Wii Menu, but the "coloured bars" that Datel reference in their documentation never show up. The screen just freezes for a few seconds instead.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/HW/VideoInterface.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/Core/Core/HW/VideoInterface.cpp b/Source/Core/Core/HW/VideoInterface.cpp
index 9af6f9f46a..d87480ff02 100644
--- a/Source/Core/Core/HW/VideoInterface.cpp
+++ b/Source/Core/Core/HW/VideoInterface.cpp
@@ -666,7 +666,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;