X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fcdriso.c;h=cf1a59e2fc0a9ecf07805379aee5388037a7aeac;hb=f8983cce17260bd0c570643734bc21ebd76e26c8;hp=7555ad2cc54750d796c962b24e539d0099cd1de9;hpb=b816fab00204011a58f0b88f35602866ca4268f7;p=pcsx_rearmed.git diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c index 7555ad2c..cf1a59e2 100644 --- a/libpcsxcore/cdriso.c +++ b/libpcsxcore/cdriso.c @@ -25,6 +25,9 @@ #include "cdriso.h" #include "ppf.h" +#include +#include + #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN #include @@ -36,8 +39,6 @@ #include #include #endif -#include -#include #define OFF_T_MSB ((off_t)1 << (sizeof(off_t) * 8 - 1)) @@ -564,20 +565,15 @@ static int parsecue(const char *isofile) { if (t != 1) sscanf(linebuf, " FILE %255s", tmpb); - // absolute path? - ti[numtracks + 1].handle = fopen(tmpb, "rb"); - if (ti[numtracks + 1].handle == NULL) { - // relative to .cue? - tmp = strrchr(tmpb, '\\'); - if (tmp == NULL) - tmp = strrchr(tmpb, '/'); - if (tmp != NULL) - tmp++; - else - tmp = tmpb; - strncpy(incue_fname, tmp, incue_max_len); - ti[numtracks + 1].handle = fopen(filepath, "rb"); - } + tmp = strrchr(tmpb, '\\'); + if (tmp == NULL) + tmp = strrchr(tmpb, '/'); + if (tmp != NULL) + tmp++; + else + tmp = tmpb; + strncpy(incue_fname, tmp, incue_max_len); + ti[numtracks + 1].handle = fopen(filepath, "rb"); // update global offset if this is not first file in this .cue if (numtracks + 1 > 1) {