diff --git a/CHANGELOG.md b/CHANGELOG.md index e0595fa0..652da760 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. ## [Unreleased] -- TBD +- Patch widescreen on Wii U ## [4.4.0] - 2020-01-12 diff --git a/GRRLIB/GRRLIB/GRRLIB_core.c b/GRRLIB/GRRLIB/GRRLIB_core.c index 38e99dff..bd1c9496 100644 --- a/GRRLIB/GRRLIB/GRRLIB_core.c +++ b/GRRLIB/GRRLIB/GRRLIB_core.c @@ -24,6 +24,7 @@ THE SOFTWARE. #include #include #include +#include #include #define __GRRLIB_CORE__ @@ -91,6 +92,15 @@ int GRRLIB_Init (void) { rmode->viXOrigin = (VI_MAX_WIDTH_NTSC - 672) / 2; #endif +#if defined(HW_RVL) + // Patch widescreen on Wii U + if (CONF_GetAspectRatio() == CONF_ASPECT_16_9 && (*(u32*)(0xCD8005A0) >> 16) == 0xCAFE) + { + write32(0xd8006a0, 0x30000004); + mask32(0xd8006a8, 0, 2); + } +#endif + // -- VIDEO_Configure(rmode);