X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fcdriso.c;h=46ee0207d4435ebe2bcf4524c507864a9351cb31;hb=f730f194726374a7f9bccc030632635d5d4a8c83;hp=2c9e692d0eff895efd3a45b66d0dd43e7820ab5d;hpb=9726a4aff95e362af3df014a02185031911bf784;p=pcsx_rearmed.git diff --git a/libpcsxcore/cdriso.c b/libpcsxcore/cdriso.c index 2c9e692d..46ee0207 100644 --- a/libpcsxcore/cdriso.c +++ b/libpcsxcore/cdriso.c @@ -26,9 +26,11 @@ #include "ppf.h" #ifdef _WIN32 +#define WIN32_LEAN_AND_MEAN #include #include #define strcasecmp _stricmp +#define usleep(x) (Sleep((x) / 1000)) #else #include #include @@ -221,7 +223,9 @@ static void *playthread(void *param) do { ret = SPU_playCDDAchannel((short *)sndbuffer, s); if (ret == 0x7761) + { usleep(6 * 1000); + } } while (ret == 0x7761 && playing); // rearmed_wait } @@ -232,7 +236,9 @@ static void *playthread(void *param) // HACK: stop feeding data while emu is paused extern int stop; while (stop && playing) + { usleep(10000); + } now = GetTickCount(); osleep = t - now; @@ -552,9 +558,9 @@ static int parsecue(const char *isofile) { pregapOffset = -1; // mark to fill track start_offset } else if (!strcmp(token, "FILE")) { - t = sscanf(linebuf, " FILE \"%256[^\"]\"", tmpb); + t = sscanf(linebuf, " FILE \"%255[^\"]\"", tmpb); if (t != 1) - sscanf(linebuf, " FILE %256s", tmpb); + sscanf(linebuf, " FILE %255s", tmpb); // absolute path? ti[numtracks + 1].handle = fopen(tmpb, "rb");