From 3454ade92db48236057814f0ade5fa45bd57cd62 Mon Sep 17 00:00:00 2001 From: Dees Troy Date: Tue, 20 Jan 2015 19:21:04 +0000 Subject: Use /twres instead of /res for theme resources AOSP and other ROM trees now do a rm -rf of the res folder during the ramdisk creation process that removes the TWRP resources. Using /twres instead of /res works around this issue making TWRP more compatible with AOSP and other build trees. Change-Id: I0d4c7e06ca381ac5aa0069b6f2b8c47f7dec49e7 --- minuitwrp/resources.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'minuitwrp/resources.c') 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) { -- cgit v1.2.3