port: fix aspect on menu models

This commit is contained in:
fgsfds committed 2023-08-22 20:22:25 +02:00
1 parent e871156301
commit 095b7540d5
1 file changed
+6
+6
View File
@@ -48,6 +48,9 @@
#include "lib/lib_317f0.h"
#include "data.h"
#include "types.h"
#ifndef PLATFORM_N64
#include "video.h"
#endif
#if VERSION >= VERSION_PAL_FINAL
char g_CheatMarqueeString[300];
@@ -2191,6 +2194,9 @@ Gfx *menuRenderModels(Gfx *gdl, struct menu840 *thing, s32 arg2)
gSPMatrix(gdl++, osVirtualToPhysical(camGetPerspectiveMtxL()), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
} else {
f32 aspect = (f32) (g_MenuScissorX2 - g_MenuScissorX1) / (f32) (g_MenuScissorY2 - g_MenuScissorY1);
#ifndef PLATFORM_N64
aspect *= videoGetAspect() / (4.0f / 3.0f);
#endif
static u32 znear = 10;
static u32 zfar = 300;