From c84d21c0f0dfd4e4d8e14f9a28345f8fb47ae80d Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Mon, 25 Nov 2024 17:28:44 +1100 Subject: [PATCH] Build fixes --- .github/workflows/build_nds.yml | 1 + src/Graphics_GCWii.c | 7 ++++--- src/Platform_WiiU.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_nds.yml b/.github/workflows/build_nds.yml index fe5ecf635..8a9170adc 100644 --- a/.github/workflows/build_nds.yml +++ b/.github/workflows/build_nds.yml @@ -21,6 +21,7 @@ jobs: - name: Compile NDS build id: compile run: | + apt-get update apt-get -y install curl export BLOCKSDS=/opt/blocksds/core export BLOCKSDSEXT=/opt/blocksds/external diff --git a/src/Graphics_GCWii.c b/src/Graphics_GCWii.c index f708963cb..5a8aa75ae 100644 --- a/src/Graphics_GCWii.c +++ b/src/Graphics_GCWii.c @@ -509,7 +509,8 @@ void Gfx_CalcPerspectiveMatrix(struct Matrix* matrix, float fov, float aspect, f void Gfx_LoadMatrix(MatrixType type, const struct Matrix* matrix) { const float* m = (const float*)matrix; - float tmp[16]; + Mtx44 dst; + float* tmp = (float*)dst; // Transpose matrix for (int i = 0; i < 4; i++) @@ -521,10 +522,10 @@ void Gfx_LoadMatrix(MatrixType type, const struct Matrix* matrix) { } if (type == MATRIX_PROJ) { - GX_LoadProjectionMtx(tmp, + GX_LoadProjectionMtx(dst, tmp[3*4+3] == 0.0f ? GX_PERSPECTIVE : GX_ORTHOGRAPHIC); } else { - GX_LoadPosMtxImm(tmp, GX_PNMTX0); + GX_LoadPosMtxImm(dst, GX_PNMTX0); } } diff --git a/src/Platform_WiiU.c b/src/Platform_WiiU.c index b558235f0..7868ce506 100644 --- a/src/Platform_WiiU.c +++ b/src/Platform_WiiU.c @@ -180,7 +180,7 @@ static cc_result File_Do(cc_file* file, const char* path, int mode) { } cc_result File_Open(cc_file* file, const cc_filepath* path) { - return File_Do(file, path, O_RDONLY); + return File_Do(file, path->buffer, O_RDONLY); } cc_result File_Create(cc_file* file, const cc_filepath* path) { return File_Do(file, path->buffer, O_RDWR | O_CREAT | O_TRUNC);