Skip to content

Commit

Permalink
Patch widescreen on Wii U
Browse files Browse the repository at this point in the history
  • Loading branch information
Crayon2000 committed Nov 7, 2020
1 parent a7f8b29 commit 2354764
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -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

Expand Down
10 changes: 10 additions & 0 deletions GRRLIB/GRRLIB/GRRLIB_core.c
Expand Up @@ -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__
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 2354764

Please sign in to comment.