diff options
author | Twinaphex | 2019-10-24 20:11:17 +0200 |
---|---|---|
committer | GitHub | 2019-10-24 20:11:17 +0200 |
commit | 1990449de5befed3c0ee614ff4b6273cfe303a8e (patch) | |
tree | 98f1b76b8a81a50b82b542b9eca9027febfa16fe /libpcsxcore | |
parent | eb6943ee04b0f30a6f1cebfe399a94bacd1dfb45 (diff) | |
parent | ba1cce07fd9b6f6734b272a51322aebb18683138 (diff) | |
download | pcsx_rearmed-1990449de5befed3c0ee614ff4b6273cfe303a8e.tar.gz pcsx_rearmed-1990449de5befed3c0ee614ff4b6273cfe303a8e.tar.bz2 pcsx_rearmed-1990449de5befed3c0ee614ff4b6273cfe303a8e.zip |
Merge pull request #358 from Sakitoshi/master
sbi support for multidisc pbp
Diffstat (limited to 'libpcsxcore')
-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; |