X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fcdriso.c;h=8171674a86d133a402e71d491c76cc0dffa18d82;hb=2ca9045dfca7302d26965abe3e85846a1770dd8f;hp=975105ed2f386da27aa9591183090500a060f73f;hpb=36e1dd7c54e92db6076ba2e249a3b2bee9f5f7c4;p=pcsx_rearmed.git diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c index 975105ed..8171674a 100644 --- a/libpcsxcore/cdriso.c +++ b/libpcsxcore/cdriso.c @@ -1140,13 +1140,18 @@ static int opensubfile(const char *isoname) { } static int opensbifile(const char *isoname) { - char sbiname[MAXPATHLEN]; + char sbiname[MAXPATHLEN], disknum[MAXPATHLEN] = "0"; int s; strncpy(sbiname, isoname, sizeof(sbiname)); sbiname[MAXPATHLEN - 1] = '\0'; if (strlen(sbiname) >= 4) { - strcpy(sbiname + strlen(sbiname) - 4, ".sbi"); + if (cdrIsoMultidiskCount > 1) { + sprintf(disknum, "_%i.sbi", cdrIsoMultidiskSelect + 1); + strcpy(sbiname + strlen(sbiname) - 4, disknum); + } + else + strcpy(sbiname + strlen(sbiname) - 4, ".sbi"); } else { return -1; @@ -1349,6 +1354,7 @@ static long CALLBACK ISOopen(void) { boolean isMode1ISO = FALSE; char alt_bin_filename[MAXPATHLEN]; const char *bin_filename; + char image_str[1024] = {0}; if (cdHandle != NULL) { return 0; // it's already open @@ -1361,7 +1367,7 @@ static long CALLBACK ISOopen(void) { return -1; } - SysPrintf(_("Loaded CD Image: %s"), GetIsoFile()); + sprintf(image_str, "Loaded CD Image: %s", GetIsoFile()); cddaBigEndian = FALSE; subChanMixed = FALSE; @@ -1374,40 +1380,40 @@ static long CALLBACK ISOopen(void) { cdimg_read_func = cdread_normal; if (parsetoc(GetIsoFile()) == 0) { - SysPrintf("[+toc]"); + strcat(image_str, "[+toc]"); } else if (parseccd(GetIsoFile()) == 0) { - SysPrintf("[+ccd]"); + strcat(image_str, "[+ccd]"); } else if (parsemds(GetIsoFile()) == 0) { - SysPrintf("[+mds]"); + strcat(image_str, "[+mds]"); } else if (parsecue(GetIsoFile()) == 0) { - SysPrintf("[+cue]"); + strcat(image_str, "[+cue]"); } if (handlepbp(GetIsoFile()) == 0) { - SysPrintf("[pbp]"); + strcat(image_str, "[+pbp]"); CDR_getBuffer = ISOgetBuffer_compr; cdimg_read_func = cdread_compressed; } else if (handlecbin(GetIsoFile()) == 0) { - SysPrintf("[cbin]"); + strcat(image_str, "[+cbin]"); CDR_getBuffer = ISOgetBuffer_compr; cdimg_read_func = cdread_compressed; } #ifdef HAVE_CHD else if (handlechd(GetIsoFile()) == 0) { - SysPrintf("[chd]"); + strcat(image_str, "[+chd]"); CDR_getBuffer = ISOgetBuffer_chd; cdimg_read_func = cdread_chd; } #endif if (!subChanMixed && opensubfile(GetIsoFile()) == 0) { - SysPrintf("[+sub]"); + strcat(image_str, "[+sub]"); } if (opensbifile(GetIsoFile()) == 0) { - SysPrintf("[+sbi]"); + strcat(image_str, "[+sbi]"); } fseeko(cdHandle, 0, SEEK_END); @@ -1445,13 +1451,13 @@ static long CALLBACK ISOopen(void) { fseek(cdHandle, 0, SEEK_SET); fread(&modeTest, 4, 1, cdHandle); if (SWAP32(modeTest) != 0xffffff00) { - SysPrintf("[2048]"); + strcat(image_str, "[2048]"); isMode1ISO = TRUE; } } fseek(cdHandle, 0, SEEK_SET); - SysPrintf(".\n"); + SysPrintf("%s.\n", image_str); PrintTracks();