From dbed7fa18d8f13e0e091a5e701c677b0dc424fde Mon Sep 17 00:00:00 2001 From: angie Date: Tue, 18 Jun 2024 13:00:56 -0400 Subject: [PATCH] Use actual pointers in osPfsNumFiles_recomp --- librecomp/src/pak.cpp | 8 ++++---- librecomp/src/pi.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/librecomp/src/pak.cpp b/librecomp/src/pak.cpp index 0ea0b6f..0be1513 100644 --- a/librecomp/src/pak.cpp +++ b/librecomp/src/pak.cpp @@ -37,11 +37,11 @@ extern "C" void osPfsChecker_recomp(uint8_t * rdram, recomp_context * ctx) { } extern "C" void osPfsNumFiles_recomp(uint8_t * rdram, recomp_context * ctx) { - PTR(s32) max_files = _arg<1, PTR(s32)>(rdram, ctx); - PTR(s32) files_used = _arg<2, PTR(s32)>(rdram, ctx); + s32* max_files = _arg<1, s32*>(rdram, ctx); + s32* files_used = _arg<2, s32*>(rdram, ctx); - MEM_W(0, max_files) = 0; - MEM_W(0, files_used) = 0; + *max_files = 0; + *files_used = 0; _return(ctx, 1); // PFS_ERR_NOPACK } diff --git a/librecomp/src/pi.cpp b/librecomp/src/pi.cpp index 202fbb2..6819e44 100644 --- a/librecomp/src/pi.cpp +++ b/librecomp/src/pi.cpp @@ -304,9 +304,10 @@ extern "C" void osPiRawStartDma_recomp(RDRAM_ARG recomp_context * ctx) { "Stub `osPiRawStartDma_recomp` function called!\n" "Most games do not call this function directly, which means the libultra function\n" "that uses this function was not properly named.\n" + "\n" "If you triggered this message, please make sure you have properly identified\n" "every libultra function on your recompiled game. If you are sure every libultra\n" - "function has been identified and you still get this issue then open an issue on\n" + "function has been identified and you still get this problem then open an issue on\n" "the N64ModernRuntime Github repository mentioning the game you are trying to\n" "recompile and steps to reproduce the issue.\n" "\n" @@ -320,9 +321,10 @@ extern "C" void osEPiRawStartDma_recomp(RDRAM_ARG recomp_context * ctx) { "Stub `osEPiRawStartDma_recomp` function called!\n" "Most games do not call this function directly, which means the libultra function\n" "that uses this function was not properly named.\n" + "\n" "If you triggered this message, please make sure you have properly identified\n" "every libultra function on your recompiled game. If you are sure every libultra\n" - "function has been identified and you still get this issue then open an issue on\n" + "function has been identified and you still get this problem then open an issue on\n" "the N64ModernRuntime Github repository mentioning the game you are trying to\n" "recompile and steps to reproduce the issue.\n" "\n"