fseek(subHandle, sector * SUB_FRAMESIZE, SEEK_SET);
if (fread(subbuffer, 1, SUB_FRAMESIZE, subHandle) != SUB_FRAMESIZE)
/* Faulty subchannel data shouldn't cause a read failure */
- return 0;
+ return 1;
if (subChanRaw) DecodeRawSubData();
}
static int cdrSeekTime(unsigned char *target)
{
- int seekTime = abs(msf2sec(cdr.SetSectorPlay) - msf2sec(target)) * (cdReadTime / 200);
+ int diff = msf2sec(cdr.SetSectorPlay) - msf2sec(target);
+ int seekTime = abs(diff) * (cdReadTime / 200);
/*
* Gameblabla :
* It was originally set to 1000000 for Driver, however it is not high enough for Worms Pinball
time[0] = itob(time[0]); time[1] = itob(time[1]); time[2] = itob(time[2]);
#define READTRACK() \
- if (CDR_readTrack(time) == -1) return -1; \
+ if (!CDR_readTrack(time)) return -1; \
buf = (void *)CDR_getBuffer(); \
if (buf == NULL) return -1; \
else CheckPPFCache((u8 *)buf, time[0], time[1], time[2]);
#include "../gpulib/gpu.h"
#include "../../include/arm_features.h"
+#if defined(__GNUC__) && (__GNUC__ >= 6 || (defined(__clang_major__) && __clang_major__ >= 10))
+#pragma GCC diagnostic ignored "-Wmisleading-indentation"
+#endif
+
#define u32 uint32_t
#define INFO_TW 0