diff --git a/project/lib/custom/jpeg/jconfig.h b/project/lib/custom/jpeg/jconfig.h index 0ffd630dde..a1c4214330 100644 --- a/project/lib/custom/jpeg/jconfig.h +++ b/project/lib/custom/jpeg/jconfig.h @@ -19,7 +19,9 @@ #define MEM_SRCDST_SUPPORTED 1 /* Use accelerated SIMD routines. */ +#ifndef __ANDROID__ #define WITH_SIMD 1 +#endif /* * Define BITS_IN_JSAMPLE as either @@ -67,9 +69,10 @@ #endif /* If rpcndr.h has defined boolean, jmorecfg.h should not. */ -#ifdef __RPCNDR_H__ -#define HAVE_BOOLEAN +#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ +typedef unsigned char boolean; #endif +#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/project/src/graphics/format/JPEG.cpp b/project/src/graphics/format/JPEG.cpp index 3917d8bb55..9253e45aae 100644 --- a/project/src/graphics/format/JPEG.cpp +++ b/project/src/graphics/format/JPEG.cpp @@ -25,9 +25,19 @@ namespace lime { static void OnOutput (j_common_ptr cinfo) {} + // #ifdef NDEBUG + // char errorMessage[JMSG_LENGTH_MAX]; + // #endif + static void OnError (j_common_ptr cinfo) { ErrorData * err = (ErrorData *)cinfo->err; + + // #ifdef NDEBUG + // ( *(cinfo->err->format_message) ) (cinfo, errorMessage); + // fprintf(stderr, "%s\n", errorMessage); + // #endif + longjmp (err->on_error, 1); }