cdrom: change pause timing again
[pcsx_rearmed.git] / plugins / cdrcimg / cdrcimg.c
index 76cdfba..b3bee27 100644 (file)
 #include <string.h>
 #include <stdlib.h>
 #include <zlib.h>
-#ifndef _WIN32
-#define CALLBACK
+#if !defined(_WIN32) && !defined(NO_DYLIB)
 #include <dlfcn.h>
-#else
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
 #endif
 
 #include "cdrcimg.h"
 
+#undef CALLBACK
+#define CALLBACK
+
 #define PFX "cdrcimg: "
 #define err(f, ...) fprintf(stderr, PFX f, ##__VA_ARGS__)
 
@@ -98,7 +97,7 @@ static long CDRgetTD(unsigned char track, unsigned char *buffer)
        return 0;
 }
 
-int uncompress2(void *out, unsigned long *out_size, void *in, unsigned long in_size)
+static int uncompress2_pcsx(void *out, unsigned long *out_size, void *in, unsigned long in_size)
 {
        static z_stream z;
        int ret = 0;
@@ -199,7 +198,7 @@ static long CDRreadTrack(unsigned char *time)
                ret = uncompress(cdbuffer->raw[0], &cdbuffer_size, cdbuffer->compressed, size);
                break;
        case CDRC_ZLIB2:
-               ret = uncompress2(cdbuffer->raw[0], &cdbuffer_size, cdbuffer->compressed, size);
+               ret = uncompress2_pcsx(cdbuffer->raw[0], &cdbuffer_size, cdbuffer->compressed, size);
                break;
        case CDRC_BZ:
                ret = pBZ2_bzBuffToBuffDecompress((char *)cdbuffer->raw, (unsigned int *)&cdbuffer_size,
@@ -285,7 +284,7 @@ static long CDRinit(void)
                        return -1;
                }
        }
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(NO_DYLIB)
        if (pBZ2_bzBuffToBuffDecompress == NULL) {
                void *h = dlopen("/usr/lib/libbz2.so.1", RTLD_LAZY);
                if (h == NULL)