Skip to content

Commit 2cf055b

Browse files
committed
card_rename_async - Use __CARDIsWritable instead of __CARDAccess
Newer versions of this function use __CARDIsWritable, which does additional permission checks if the game id and/or maker codes do not match.
1 parent e241fea commit 2cf055b

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed

ttyd-tools/rel/include/gc/card.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ void *__CARDGetDirBlock(void *card);
8989
int32_t __CARDUpdateDir(int32_t channel, CARDCallback callback);
9090
bool __CARDCompareFileName(void *dirBlock, const char *fileName);
9191
int32_t __CARDAccess(void *card, void *dirBlock);
92+
int32_t __CARDIsWritable(void *card, void *dirBlock);
9293
}
9394

9495
// Manually-written functions

ttyd-tools/rel/include/lst/ttyd.eu.lst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2403,7 +2403,7 @@
24032403
// 802B479C:CARDFormatAsync
24042404
802B47E4:__CARDCompareFileName
24052405
802B484C:__CARDAccess
2406-
// 802B48E0:__CARDIsWritable
2406+
802B48E0:__CARDIsWritable
24072407
// 802B4A14:__CARDIsReadable
24082408
// 802B4B08:__CARDGetFileNo
24092409
802B4C58:CARDOpen

ttyd-tools/rel/include/lst/ttyd.jp.lst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2403,7 +2403,7 @@
24032403
// 802AA91C:CARDFormatAsync
24042404
802AA964:__CARDCompareFileName
24052405
802AA9CC:__CARDAccess
2406-
// 802AAA60:__CARDIsWritable
2406+
802AAA60:__CARDIsWritable
24072407
// 802AAB94:__CARDIsReadable
24082408
// 802AAC88:__CARDGetFileNo
24092409
802AADD8:CARDOpen

ttyd-tools/rel/include/lst/ttyd.us.lst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2403,7 +2403,7 @@ unused:winFontSetCenter
24032403
// 802B0720:CARDFormatAsync
24042404
802B0768:__CARDCompareFileName
24052405
802B07D0:__CARDAccess
2406-
// 802B0864:__CARDIsWritable
2406+
802B0864:__CARDIsWritable
24072407
// 802B0998:__CARDIsReadable
24082408
// 802B0A8C:__CARDGetFileNo
24092409
802B0BDC:CARDOpen

ttyd-tools/rel/source/gc/card.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ int32_t card_rename_async(int32_t channel, const char *oldName, const char *newN
9191
// Make sure this game has proper access to the file that is being renamed
9292
uint8_t *CurrentDirBlock = reinterpret_cast<uint8_t *>(DirBlock + (OldNameFileIndex * 0x40));
9393

94-
ReturnCode = __CARDAccess(Card, CurrentDirBlock);
94+
ReturnCode = __CARDIsWritable(Card, CurrentDirBlock);
9595
if (ReturnCode != CARD_RESULT_READY)
9696
{
9797
__CARDPutControlBlock(Card, ReturnCode);

ttyd-tools/rel/source/global.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace mod {
77

8-
const char *VersionNumber = "v3.0.54";
8+
const char *VersionNumber = "v3.0.55d";
99

1010
const char *RootLines[] =
1111
{

0 commit comments

Comments
 (0)