summaryrefslogtreecommitdiffstats
path: root/minuitwrp
diff options
context:
space:
mode:
authorDees Troy <dees_troy@teamw.in>2015-01-20 20:21:04 +0100
committerEthan Yonker <dees_troy@teamw.in>2015-01-22 22:21:27 +0100
commit3454ade92db48236057814f0ade5fa45bd57cd62 (patch)
tree8cf3de0c390157420ad0fe9a33b17237132ba7cb /minuitwrp
parentHide some non critical error messages (diff)
downloadandroid_bootable_recovery-3454ade92db48236057814f0ade5fa45bd57cd62.tar
android_bootable_recovery-3454ade92db48236057814f0ade5fa45bd57cd62.tar.gz
android_bootable_recovery-3454ade92db48236057814f0ade5fa45bd57cd62.tar.bz2
android_bootable_recovery-3454ade92db48236057814f0ade5fa45bd57cd62.tar.lz
android_bootable_recovery-3454ade92db48236057814f0ade5fa45bd57cd62.tar.xz
android_bootable_recovery-3454ade92db48236057814f0ade5fa45bd57cd62.tar.zst
android_bootable_recovery-3454ade92db48236057814f0ade5fa45bd57cd62.zip
Diffstat (limited to 'minuitwrp')
-rw-r--r--minuitwrp/Android.mk1
-rw-r--r--minuitwrp/graphics.c2
-rw-r--r--minuitwrp/resources.c5
3 files changed, 5 insertions, 3 deletions
diff --git a/minuitwrp/Android.mk b/minuitwrp/Android.mk
index c4380aadd..cff532167 100644
--- a/minuitwrp/Android.mk
+++ b/minuitwrp/Android.mk
@@ -123,6 +123,7 @@ else
LOCAL_SRC_FILES += truetype.c
endif
+LOCAL_CFLAGS += -DTWRES=\"$(TWRES_PATH)\"
LOCAL_SHARED_LIBRARIES += libz libc libcutils libjpeg libpng
LOCAL_STATIC_LIBRARIES += libpixelflinger_static
LOCAL_MODULE_TAGS := eng
diff --git a/minuitwrp/graphics.c b/minuitwrp/graphics.c
index d08e74303..512a95716 100644
--- a/minuitwrp/graphics.c
+++ b/minuitwrp/graphics.c
@@ -626,7 +626,7 @@ void* gr_loadFont(const char* fontName)
{
char tmp[128];
- sprintf(tmp, "/res/fonts/%s.dat", fontName);
+ sprintf(tmp, TWRES "fonts/%s.dat", fontName);
fd = open(tmp, O_RDONLY);
if (fd == -1)
return NULL;
diff --git a/minuitwrp/resources.c b/minuitwrp/resources.c
index bb301477f..2e58311af 100644
--- a/minuitwrp/resources.c
+++ b/minuitwrp/resources.c
@@ -59,7 +59,8 @@ static int open_png(const char* name, png_structp* png_ptr, png_infop* info_ptr,
unsigned char header[8];
int result = 0;
- snprintf(resPath, sizeof(resPath)-1, "/res/images/%s.png", name);
+ snprintf(resPath, sizeof(resPath)-1, TWRES "images/%s.png", name);
+ printf("open_png %s\n", resPath);
resPath[sizeof(resPath)-1] = '\0';
FILE* fp = fopen(resPath, "rb");
if (fp == NULL) {
@@ -261,7 +262,7 @@ int res_create_surface_jpg(const char* name, gr_surface* pSurface) {
if (fp == NULL) {
char resPath[256];
- snprintf(resPath, sizeof(resPath)-1, "/res/images/%s", name);
+ snprintf(resPath, sizeof(resPath)-1, TWRES "images/%s", name);
resPath[sizeof(resPath)-1] = '\0';
fp = fopen(resPath, "rb");
if (fp == NULL) {