Patch widescreen on Wii U

This commit is contained in:
Crayon2000 2020-11-07 11:45:18 -05:00 committed by Crayon
parent a7f8b29c5b
commit 235476440a
2 changed files with 11 additions and 1 deletions

View file

@ -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

View file

@ -24,6 +24,7 @@ THE SOFTWARE.
#include <malloc.h>
#include <string.h>
#include <ogc/conf.h>
#include <ogc/machine/processor.h>
#include <fat.h>
#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);