summaryrefslogtreecommitdiffstats
path: root/minuitwrp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2016-01-27 17:57:26 +0100
committerEthan Yonker <dees_troy@teamw.in>2016-01-27 17:58:02 +0100
commite95c4868b9ba215e858294fb4d0bfbf2634d01f4 (patch)
tree8f8bb99a064cfc7f8cb58dfa610620c9b44b5bf3 /minuitwrp
parentUpdate minuitwrp graphics in line with latest minui (diff)
downloadandroid_bootable_recovery-e95c4868b9ba215e858294fb4d0bfbf2634d01f4.tar
android_bootable_recovery-e95c4868b9ba215e858294fb4d0bfbf2634d01f4.tar.gz
android_bootable_recovery-e95c4868b9ba215e858294fb4d0bfbf2634d01f4.tar.bz2
android_bootable_recovery-e95c4868b9ba215e858294fb4d0bfbf2634d01f4.tar.lz
android_bootable_recovery-e95c4868b9ba215e858294fb4d0bfbf2634d01f4.tar.xz
android_bootable_recovery-e95c4868b9ba215e858294fb4d0bfbf2634d01f4.tar.zst
android_bootable_recovery-e95c4868b9ba215e858294fb4d0bfbf2634d01f4.zip
Diffstat (limited to 'minuitwrp')
-rw-r--r--minuitwrp/Android.mk6
-rw-r--r--minuitwrp/resources.cpp8
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;
}