From: Sakitoshi Date: Thu, 24 Oct 2019 04:14:07 +0000 (-0300) Subject: sbi support for multidisc pbp X-Git-Tag: r24l~692^2 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba1cce07fd9b6f6734b272a51322aebb18683138;p=pcsx_rearmed.git 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. --- diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c index daed921e..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;