From c2682dd9646d0ae7dd839b6e5e1cf40eb5aa2f79 Mon Sep 17 00:00:00 2001 From: jranderia3 <94210600+jranderia3@users.noreply.github.com> Date: Fri, 14 Jun 2024 14:04:58 -0400 Subject: [PATCH] whb/gfx: Use 4:3 TV buffers on 4:3 TVs (#383) * square monitor support * Update gfx.c Fix typo * do it using gx2 instead of avm * Update gfx.c remove some newlines * Update gfx.c newline fix * Update gfx.c --- libraries/libwhb/src/gfx.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/libraries/libwhb/src/gfx.c b/libraries/libwhb/src/gfx.c index 9ef62f16..e1fcf27a 100644 --- a/libraries/libwhb/src/gfx.c +++ b/libraries/libwhb/src/gfx.c @@ -315,9 +315,15 @@ WHBGfxInit() { case GX2_TV_SCAN_MODE_480I: case GX2_TV_SCAN_MODE_480P: - sTvRenderMode = GX2_TV_RENDER_MODE_WIDE_480P; - tvWidth = 854; - tvHeight = 480; + if (GX2GetSystemTVAspectRatio() == GX2_ASPECT_RATIO_16_9) { + sTvRenderMode = GX2_TV_RENDER_MODE_WIDE_480P; + tvWidth = 854; + tvHeight = 480; + } else { + sTvRenderMode = GX2_TV_RENDER_MODE_STANDARD_480P; + tvWidth = 640; + tvHeight = 480; + } break; case GX2_TV_SCAN_MODE_1080I: case GX2_TV_SCAN_MODE_1080P: