Skip to content

Commit

Permalink
try to fix cdfs access
Browse files Browse the repository at this point in the history
  • Loading branch information
israpps committed Feb 21, 2024
1 parent f4a8934 commit b4f7bea
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1178,8 +1178,13 @@ static void loadCdModules(void)
int ret, id;

if (!have_cdvd) {
#ifdef SUPPORT_SYSTEM_2X6
id = SifLoadStartModule("rom0:CDVDFSV", 0, NULL, &ret);
DPRINTF(" [rom0:CDVDFSV]: ID=%d, ret=%d\n", id, ret);
#else
id = SifExecModuleBuffer(cdvd_irx, size_cdvd_irx, 0, NULL, &ret);
DPRINTF(" [CDVD]: id=%d, ret=%d\n", id, ret);
#endif
sceCdInit(SCECdINoD); // SCECdINoD init without check for a disc. Reduces risk of a lockup if the drive is in a erroneous state.
CDVD_Init();
have_cdvd = 1;
Expand Down Expand Up @@ -1279,12 +1284,10 @@ static void getExternalFilePath(const char *argPath, char *filePath)
mountDVRPParty(party);

#endif
#ifndef SUPPORT_SYSTEM_2X6
} else if (!strncmp(argPath, "cdfs", 4)) {
strcpy(filePath, argPath);
CDVD_FlushCache();
CDVD_DiskReady(0);
#endif
} else {
genFixPath(argPath, filePath);
}
Expand Down Expand Up @@ -2353,13 +2356,11 @@ static void Execute(char *pathin)
}
Show_build_info();
return;
#ifndef SUPPORT_SYSTEM_2X6
} else if (!strncmp(path, "cdfs", 4)) {
CDVD_FlushCache();
CDVD_DiskReady(0);
party[0] = 0;
goto CheckELF_path;
#endif
} else if (!strncmp(path, "rom", 3)) {
party[0] = 0;
CheckELF_path:
Expand Down Expand Up @@ -2421,9 +2422,7 @@ int i, d;
DPRINTF(" [UDPTTY]: id=%d, ret=%d\n", i, d);
#endif
loadBasicModules();
#ifndef SUPPORT_SYSTEM_2X6
loadCdModules();
#endif
DPRINTF("Initializing fileXio RPC\n");
fileXioInit();
//Increase the FILEIO R/W buffer size to reduce overhead.
Expand Down

0 comments on commit b4f7bea

Please sign in to comment.