arm64: use ldp/stp more
[pcsx_rearmed.git] / libpcsxcore / cdriso.c
index 3189579..eeb2c35 100644 (file)
@@ -30,8 +30,7 @@
 #include <process.h>
 #include <windows.h>
 #define strcasecmp _stricmp
-#define usleep(x) Sleep((x) / 1000)
-#else
+#elif P_HAVE_PTHREAD
 #include <pthread.h>
 #include <sys/time.h>
 #include <unistd.h>
@@ -110,7 +109,7 @@ struct trackinfo {
        char start[3];          // MSF-format
        char length[3];         // MSF-format
        FILE *handle;           // for multi-track images CDDA
-       unsigned int start_offset; // byte offset from start of above file
+       unsigned int start_offset; // byte offset from start of above file (chd: sector offset)
 };
 
 #define MAXTRACKS 100 /* How many tracks can a CD hold? */
@@ -1229,7 +1228,7 @@ static int cdread_chd(FILE *f, unsigned int base, void *dest, int sector)
 {
        int hunk;
 
-       assert(base == 0);
+       sector += base;
 
        hunk = sector / chd_img->sectors_per_hunk;
        chd_img->sector_in_hunk = sector % chd_img->sectors_per_hunk;