diff options
author | Sakitoshi | 2019-10-24 01:14:07 -0300 |
---|---|---|
committer | Sakitoshi | 2019-10-24 01:14:07 -0300 |
commit | ba1cce07fd9b6f6734b272a51322aebb18683138 (patch) | |
tree | 98f1b76b8a81a50b82b542b9eca9027febfa16fe | |
parent | eb6943ee04b0f30a6f1cebfe399a94bacd1dfb45 (diff) | |
download | pcsx_rearmed-ba1cce07fd9b6f6734b272a51322aebb18683138.tar.gz pcsx_rearmed-ba1cce07fd9b6f6734b272a51322aebb18683138.tar.bz2 pcsx_rearmed-ba1cce07fd9b6f6734b272a51322aebb18683138.zip |
sbi support for multidisc pbp
same syntaxis as beetle-psx, name the sbi file after the pbp and append an underscore and the number of the disc at the end.
-rw-r--r-- | libpcsxcore/cdriso.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c index daed921..8171674 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; |