From 235476440a0482e863876799f2ee26083eeb5bb8 Mon Sep 17 00:00:00 2001 From: Crayon2000 Date: Sat, 7 Nov 2020 11:45:18 -0500 Subject: [PATCH] Patch widescreen on Wii U --- CHANGELOG.md | 2 +- GRRLIB/GRRLIB/GRRLIB_core.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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);