X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fcdrcimg%2Fcdrcimg.c;h=047357ac3519854e994e844c025e1ece2ccee6f0;hb=8622c9dcd0abc62601ff6c64f93f9294c520ed58;hp=91cf1cad1795976b0c3a10207f1824df4b6191af;hpb=8a55ebcc07d4f860633db8c77bb9e16bcfa03313;p=pcsx_rearmed.git diff --git a/plugins/cdrcimg/cdrcimg.c b/plugins/cdrcimg/cdrcimg.c index 91cf1cad..047357ac 100644 --- a/plugins/cdrcimg/cdrcimg.c +++ b/plugins/cdrcimg/cdrcimg.c @@ -12,16 +12,15 @@ #include #include #include -#ifndef _WIN32 -#define CALLBACK +#if !defined(_WIN32) && !defined(NO_DYLIB) #include -#else -#define WIN32_LEAN_AND_MEAN -#include #endif #include "cdrcimg.h" +#undef CALLBACK +#define CALLBACK + #define PFX "cdrcimg: " #define err(f, ...) fprintf(stderr, PFX f, ##__VA_ARGS__) @@ -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) @@ -415,6 +414,8 @@ static long CDRopen(void) char *ext; FILE *f = NULL; + printf("%s cd_file=%d\n", __func__, cd_file == NULL ? 0 : 1); + if (cd_file != NULL) return 0; // it's already open