Build fixes

This commit is contained in:
UnknownShadow200 2024-11-25 17:28:44 +11:00
parent 50eeaa0409
commit c84d21c0f0
3 changed files with 6 additions and 4 deletions

View File

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

View File

@ -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);
}
}

View File

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