X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fcdrcimg%2Fcdrcimg.c;h=007e96b96d02eccf2bf82197a1920aff3fd2efb2;hb=270c6dd14f876b8a67929aa22abefc47f4588324;hp=036c68d6c77df4b3e8fc0a722136138ce5a24246;hpb=fc99395c2d7efbbaa0663feed47dc89a54e49506;p=pcsx_rearmed.git diff --git a/plugins/cdrcimg/cdrcimg.c b/plugins/cdrcimg/cdrcimg.c index 036c68d6..007e96b9 100644 --- a/plugins/cdrcimg/cdrcimg.c +++ b/plugins/cdrcimg/cdrcimg.c @@ -8,13 +8,15 @@ * See the COPYING file in the top-level directory. */ +#include + #include #include #include #include #ifndef _WIN32 #define CALLBACK -#ifndef _3DS +#ifndef NO_DYLIB #include #endif #else @@ -100,7 +102,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; @@ -201,7 +203,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, @@ -287,7 +289,7 @@ static long CDRinit(void) return -1; } } -#if !defined(_WIN32) && !defined(_3DS) +#if !defined(_WIN32) && !defined(NO_DYLIB) if (pBZ2_bzBuffToBuffDecompress == NULL) { void *h = dlopen("/usr/lib/libbz2.so.1", RTLD_LAZY); if (h == NULL) @@ -321,7 +323,7 @@ static long handle_eboot(void) int i, ret; FILE *f; - f = fopen(cd_fname, "rb"); + f = fopen_utf8(cd_fname, "rb"); if (f == NULL) { err("missing file: %s: ", cd_fname); perror(NULL); @@ -460,7 +462,7 @@ static long CDRopen(void) return -1; } - f = fopen(table_fname, "rb"); + f = fopen_utf8(table_fname, "rb"); if (f == NULL) { err("missing file: %s: ", table_fname); perror(NULL); @@ -525,7 +527,7 @@ static long CDRopen(void) break; } - cd_file = fopen(cd_fname, "rb"); + cd_file = fopen_utf8(cd_fname, "rb"); if (cd_file == NULL) { err("failed to open: %s: ", table_fname); perror(NULL);