diff options
Diffstat (limited to 'minuitwrp')
-rw-r--r-- | minuitwrp/Android.mk | 6 | ||||
-rw-r--r-- | minuitwrp/resources.cpp | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/minuitwrp/Android.mk b/minuitwrp/Android.mk index 39c61c40e..ac4c181e5 100644 --- a/minuitwrp/Android.mk +++ b/minuitwrp/Android.mk @@ -55,10 +55,11 @@ LOCAL_C_INCLUDES += \ external/libpng \ external/zlib \ system/core/include \ - external/jpeg \ external/freetype/include \ external/libcxx/include +#external/jpeg \ + ifeq ($(RECOVERY_TOUCHSCREEN_SWAP_XY), true) LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_SWAP_XY endif @@ -151,7 +152,8 @@ endif LOCAL_CLANG := true LOCAL_CFLAGS += -DTWRES=\"$(TWRES_PATH)\" -LOCAL_SHARED_LIBRARIES += libft2 libz libc libcutils libjpeg libpng libutils +LOCAL_SHARED_LIBRARIES += libft2 libz libc libcutils libpng libutils +#libjpeg LOCAL_STATIC_LIBRARIES += libpixelflinger_twrp LOCAL_MODULE_TAGS := eng LOCAL_MODULE := libminuitwrp diff --git a/minuitwrp/resources.cpp b/minuitwrp/resources.cpp index 781df2b06..c4325e412 100644 --- a/minuitwrp/resources.cpp +++ b/minuitwrp/resources.cpp @@ -31,9 +31,11 @@ #include <png.h> #include <pixelflinger/pixelflinger.h> +#ifdef TW_INCLUDE_JPEG extern "C" { #include "jpeglib.h" } +#endif #include "minui.h" #define SURFACE_DATA_ALIGNMENT 8 @@ -251,6 +253,7 @@ int res_create_surface_png(const char* name, gr_surface* pSurface) { return result; } +#ifdef TW_INCLUDE_JPEG int res_create_surface_jpg(const char* name, gr_surface* pSurface) { GGLSurface* surface = NULL; int result = 0, y; @@ -348,18 +351,23 @@ exit: } return result; } +#endif int res_create_surface(const char* name, gr_surface* pSurface) { int ret; if (!name) return -1; +#ifdef TW_INCLUDE_JPEG if (strlen(name) > 4 && strcmp(name + strlen(name) - 4, ".jpg") == 0) return res_create_surface_jpg(name,pSurface); +#endif ret = res_create_surface_png(name,pSurface); +#ifdef TW_INCLUDE_JPEG if (ret < 0) ret = res_create_surface_jpg(name,pSurface); +#endif return ret; } |