libretro/pcsx_rearmed#743
char alt_bin_filename[MAXPATHLEN];
const char *bin_filename;
char image_str[1024];
char alt_bin_filename[MAXPATHLEN];
const char *bin_filename;
char image_str[1024];
if (cdHandle != NULL) {
return 0; // it's already open
if (cdHandle != NULL) {
return 0; // it's already open
CDR_getBuffer = ISOgetBuffer_chd;
cdimg_read_func = cdread_chd;
cdimg_read_sub_func = cdread_sub_chd;
CDR_getBuffer = ISOgetBuffer_chd;
cdimg_read_func = cdread_chd;
cdimg_read_sub_func = cdread_sub_chd;
}
// guess whether it is mode1/2048
}
// guess whether it is mode1/2048
- if (ftello(cdHandle) % 2048 == 0) {
+ if (cdimg_read_func == cdread_normal && ftello(cdHandle) % 2048 == 0) {
unsigned int modeTest = 0;
fseek(cdHandle, 0, SEEK_SET);
if (!fread(&modeTest, sizeof(modeTest), 1, cdHandle)) {
unsigned int modeTest = 0;
fseek(cdHandle, 0, SEEK_SET);
if (!fread(&modeTest, sizeof(modeTest), 1, cdHandle)) {
SysPrintf(_("File IO error in <%s:%s>.\n"), __FILE__, __func__);
SysPrintf(_("File IO error in <%s:%s>.\n"), __FILE__, __func__);
}
if (SWAP32(modeTest) != 0xffffff00) {
strcat(image_str, "[2048]");
}
if (SWAP32(modeTest) != 0xffffff00) {
strcat(image_str, "[2048]");
- if (subChanMixed && !is_chd) {
+ if (subChanMixed && cdimg_read_func == cdread_normal) {
cdimg_read_func = cdread_sub_mixed;
cdimg_read_sub_func = cdread_sub_sub_mixed;
}
cdimg_read_func = cdread_sub_mixed;
cdimg_read_sub_func = cdread_sub_sub_mixed;
}