Skip to content

Commit

Permalink
Use actual pointers in osPfsNumFiles_recomp
Browse files Browse the repository at this point in the history
  • Loading branch information
AngheloAlf committed Jun 18, 2024
1 parent 1681301 commit dbed7fa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions librecomp/src/pak.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<s32>(ctx, 1); // PFS_ERR_NOPACK
}
Expand Down
6 changes: 4 additions & 2 deletions librecomp/src/pi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit dbed7fa

Please sign in to comment.