summaryrefslogtreecommitdiffstats
path: root/minuitwrp
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2013-04-02 22:22:16 +0200
committerDees_Troy <dees_troy@teamw.in>2013-04-04 20:57:34 +0200
commit2673cec07a4740f86438b50cfe1b70b258a9a8c8 (patch)
tree3133d98e33eba4fab9760f9a4a54aeac83107119 /minuitwrp
parentAdd partition list GUI element (diff)
downloadandroid_bootable_recovery-2673cec07a4740f86438b50cfe1b70b258a9a8c8.tar
android_bootable_recovery-2673cec07a4740f86438b50cfe1b70b258a9a8c8.tar.gz
android_bootable_recovery-2673cec07a4740f86438b50cfe1b70b258a9a8c8.tar.bz2
android_bootable_recovery-2673cec07a4740f86438b50cfe1b70b258a9a8c8.tar.lz
android_bootable_recovery-2673cec07a4740f86438b50cfe1b70b258a9a8c8.tar.xz
android_bootable_recovery-2673cec07a4740f86438b50cfe1b70b258a9a8c8.tar.zst
android_bootable_recovery-2673cec07a4740f86438b50cfe1b70b258a9a8c8.zip
Diffstat (limited to 'minuitwrp')
-rw-r--r--minuitwrp/Android.mk18
-rw-r--r--minuitwrp/events.c50
-rw-r--r--minuitwrp/graphics.c18
-rw-r--r--minuitwrp/resources.c2
4 files changed, 47 insertions, 41 deletions
diff --git a/minuitwrp/Android.mk b/minuitwrp/Android.mk
index f0c708927..59ca2ccc5 100644
--- a/minuitwrp/Android.mk
+++ b/minuitwrp/Android.mk
@@ -1,7 +1,9 @@
LOCAL_PATH := $(call my-dir)
+
include $(CLEAR_VARS)
LOCAL_SRC_FILES := events.c resources.c
+#LOCAL_SRC_FILES := $(TARGET_OUT_SHARED_LIBRARIES)/libjpegtwrp.so $(TARGET_OUT_SHARED_LIBRARIES)/libpng.so $(TARGET_OUT_SHARED_LIBRARIES)/libpixelflinger.so
ifneq ($(TW_BOARD_CUSTOM_GRAPHICS),)
LOCAL_SRC_FILES += $(TW_BOARD_CUSTOM_GRAPHICS)
@@ -9,11 +11,13 @@ else
LOCAL_SRC_FILES += graphics.c
endif
-LOCAL_C_INCLUDES +=\
- external/libpng\
- external/zlib\
- external/jpeg
+LOCAL_C_INCLUDES += \
+ external/libpng \
+ external/zlib \
+ system/core/include
+LOCAL_C_INCLUDES += \
+ bootable/recovery/libjpegtwrp
ifeq ($(RECOVERY_TOUCHSCREEN_SWAP_XY), true)
LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_SWAP_XY
@@ -54,7 +58,9 @@ endif
ifneq ($(BOARD_USE_CUSTOM_RECOVERY_FONT),)
LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=$(BOARD_USE_CUSTOM_RECOVERY_FONT)
endif
-LOCAL_STATIC_LIBRARY := libpng
+LOCAL_SHARED_LIBRARIES += libz libpixelflinger libc libcutils
+LOCAL_STATIC_LIBRARIES += libpng libjpegtwrp
+LOCAL_MODULE_TAGS := eng
LOCAL_MODULE := libminuitwrp
-include $(BUILD_STATIC_LIBRARY)
+include $(BUILD_SHARED_LIBRARY) \ No newline at end of file
diff --git a/minuitwrp/events.c b/minuitwrp/events.c
index 285b5b6e7..73c4066aa 100644
--- a/minuitwrp/events.c
+++ b/minuitwrp/events.c
@@ -152,11 +152,11 @@ static int vk_init(struct ev *e)
len = ioctl(e->fd->fd, EVIOCGNAME(sizeof(e->deviceName)), e->deviceName);
if (len <= 0)
{
- LOGE("Unable to query event object.\n");
+ printf("Unable to query event object.\n");
return -1;
}
#ifdef _EVENT_LOGGING
- LOGI("Event object: %s\n", e->deviceName);
+ printf("Event object: %s\n", e->deviceName);
#endif
// Blacklist these "input" devices
@@ -188,7 +188,7 @@ static int vk_init(struct ev *e)
}
if (e->vk_count % 6) {
- LOGW("minui: %s is %d %% 6\n", vk_path, e->vk_count % 6);
+ printf("minui: %s is %d %% 6\n", vk_path, e->vk_count % 6);
}
e->vk_count /= 6;
if (e->vk_count <= 0)
@@ -201,14 +201,14 @@ static int vk_init(struct ev *e)
ioctl(e->fd->fd, EVIOCGABS(ABS_Y), &e->p.yi);
e->p.synced = 0;
#ifdef _EVENT_LOGGING
- LOGI("EV: ST minX: %d maxX: %d minY: %d maxY: %d\n", e->p.xi.minimum, e->p.xi.maximum, e->p.yi.minimum, e->p.yi.maximum);
+ printf("EV: ST minX: %d maxX: %d minY: %d maxY: %d\n", e->p.xi.minimum, e->p.xi.maximum, e->p.yi.minimum, e->p.yi.maximum);
#endif
ioctl(e->fd->fd, EVIOCGABS(ABS_MT_POSITION_X), &e->mt_p.xi);
ioctl(e->fd->fd, EVIOCGABS(ABS_MT_POSITION_Y), &e->mt_p.yi);
e->mt_p.synced = 0;
#ifdef _EVENT_LOGGING
- LOGI("EV: MT minX: %d maxX: %d minY: %d maxY: %d\n", e->mt_p.xi.minimum, e->mt_p.xi.maximum, e->mt_p.yi.minimum, e->mt_p.yi.maximum);
+ printf("EV: MT minX: %d maxX: %d minY: %d maxY: %d\n", e->mt_p.xi.minimum, e->mt_p.xi.maximum, e->mt_p.yi.minimum, e->mt_p.yi.maximum);
#endif
e->vks = malloc(sizeof(*e->vks) * e->vk_count);
@@ -223,7 +223,7 @@ static int vk_init(struct ev *e)
if (strcmp(token[0], "0x01") != 0) {
/* Java does string compare, so we do too. */
- LOGW("minui: %s: ignoring unknown virtual key type %s\n", vk_path, token[0]);
+ printf("minui: %s: ignoring unknown virtual key type %s\n", vk_path, token[0]);
continue;
}
@@ -299,7 +299,7 @@ static int vk_tp_to_screen(struct position *p, int *x, int *y)
}
#ifdef _EVENT_LOGGING
- LOGI("EV: p->x=%d x-range=%d,%d fb-width=%d\n", p->x, p->xi.minimum, p->xi.maximum, gr_fb_width());
+ printf("EV: p->x=%d x-range=%d,%d fb-width=%d\n", p->x, p->xi.minimum, p->xi.maximum, gr_fb_width());
#endif
#ifndef RECOVERY_TOUCHSCREEN_SWAP_XY
@@ -341,14 +341,14 @@ static int vk_modify(struct ev *e, struct input_event *ev)
{
// This appears to be an accelerometer or another strange input device. It's not the touchscreen.
#ifdef _EVENT_LOGGING
- LOGI("EV: Device disabled due to non-touchscreen messages.\n");
+ printf("EV: Device disabled due to non-touchscreen messages.\n");
#endif
e->ignored = 1;
return 1;
}
#ifdef _EVENT_LOGGING
- LOGI("EV: %s => type: %x code: %x value: %d\n", e->deviceName, ev->type, ev->code, ev->value);
+ printf("EV: %s => type: %x code: %x value: %d\n", e->deviceName, ev->type, ev->code, ev->value);
#endif
// Handle keyboard events, value of 1 indicates key down, 0 indicates key up
@@ -363,7 +363,7 @@ static int vk_modify(struct ev *e, struct input_event *ev)
e->p.synced |= 0x01;
e->p.x = ev->value;
#ifdef _EVENT_LOGGING
- LOGI("EV: %s => EV_ABS ABS_X %d\n", e->deviceName, ev->value);
+ printf("EV: %s => EV_ABS ABS_X %d\n", e->deviceName, ev->value);
#endif
break;
@@ -371,7 +371,7 @@ static int vk_modify(struct ev *e, struct input_event *ev)
e->p.synced |= 0x02;
e->p.y = ev->value;
#ifdef _EVENT_LOGGING
- LOGI("EV: %s => EV_ABS ABS_Y %d\n", e->deviceName, ev->value);
+ printf("EV: %s => EV_ABS ABS_Y %d\n", e->deviceName, ev->value);
#endif
break;
@@ -400,7 +400,7 @@ static int vk_modify(struct ev *e, struct input_event *ev)
touchReleaseOnNextSynReport = 1;
}
#ifdef _EVENT_LOGGING
- LOGI("EV: %s => EV_ABS ABS_MT_TOUCH_MAJOR %d\n", e->deviceName, ev->value);
+ printf("EV: %s => EV_ABS ABS_MT_TOUCH_MAJOR %d\n", e->deviceName, ev->value);
#endif
break;
@@ -413,7 +413,7 @@ static int vk_modify(struct ev *e, struct input_event *ev)
touchReleaseOnNextSynReport = 1;
}
#ifdef _EVENT_LOGGING
- LOGI("EV: %s => EV_ABS ABS_MT_PRESSURE %d\n", e->deviceName, ev->value);
+ printf("EV: %s => EV_ABS ABS_MT_PRESSURE %d\n", e->deviceName, ev->value);
#endif
break;
@@ -421,7 +421,7 @@ static int vk_modify(struct ev *e, struct input_event *ev)
e->mt_p.synced |= 0x01;
e->mt_p.x = ev->value;
#ifdef _EVENT_LOGGING
- LOGI("EV: %s => EV_ABS ABS_MT_POSITION_X %d\n", e->deviceName, ev->value);
+ printf("EV: %s => EV_ABS ABS_MT_POSITION_X %d\n", e->deviceName, ev->value);
#endif
break;
@@ -429,29 +429,29 @@ static int vk_modify(struct ev *e, struct input_event *ev)
e->mt_p.synced |= 0x02;
e->mt_p.y = ev->value;
#ifdef _EVENT_LOGGING
- LOGI("EV: %s => EV_ABS ABS_MT_POSITION_Y %d\n", e->deviceName, ev->value);
+ printf("EV: %s => EV_ABS ABS_MT_POSITION_Y %d\n", e->deviceName, ev->value);
#endif
break;
#ifdef _EVENT_LOGGING
// All of these items are strictly for logging purposes only. Return 1 because they don't need to be handled.
case ABS_MT_TOUCH_MINOR: //31
- LOGI("EV: %s => EV_ABS ABS_MT_TOUCH_MINOR %d\n", e->deviceName, ev->value);
+ printf("EV: %s => EV_ABS ABS_MT_TOUCH_MINOR %d\n", e->deviceName, ev->value);
return 1;
break;
case ABS_MT_WIDTH_MAJOR: //32
- LOGI("EV: %s => EV_ABS ABS_MT_WIDTH_MAJOR %d\n", e->deviceName, ev->value);
+ printf("EV: %s => EV_ABS ABS_MT_WIDTH_MAJOR %d\n", e->deviceName, ev->value);
return 1;
break;
case ABS_MT_WIDTH_MINOR: //33
- LOGI("EV: %s => EV_ABS ABS_MT_WIDTH_MINOR %d\n", e->deviceName, ev->value);
+ printf("EV: %s => EV_ABS ABS_MT_WIDTH_MINOR %d\n", e->deviceName, ev->value);
return 1;
break;
case ABS_MT_ORIENTATION: //34
- LOGI("EV: %s => EV_ABS ABS_MT_ORIENTATION %d\n", e->deviceName, ev->value);
+ printf("EV: %s => EV_ABS ABS_MT_ORIENTATION %d\n", e->deviceName, ev->value);
return 1;
break;
@@ -461,17 +461,17 @@ static int vk_modify(struct ev *e, struct input_event *ev)
break;
case ABS_MT_BLOB_ID: //38
- LOGI("EV: %s => EV_ABS ABS_MT_BLOB_ID %d\n", e->deviceName, ev->value);
+ printf("EV: %s => EV_ABS ABS_MT_BLOB_ID %d\n", e->deviceName, ev->value);
return 1;
break;
case ABS_MT_TRACKING_ID: //39
- LOGI("EV: %s => EV_ABS ABS_MT_TRACKING_ID %d\n", e->deviceName, ev->value);
+ printf("EV: %s => EV_ABS ABS_MT_TRACKING_ID %d\n", e->deviceName, ev->value);
return 1;
break;
case ABS_MT_DISTANCE: //3b
- LOGI("EV: %s => EV_ABS ABS_MT_DISTANCE %d\n", e->deviceName, ev->value);
+ printf("EV: %s => EV_ABS ABS_MT_DISTANCE %d\n", e->deviceName, ev->value);
return 1;
break;
#endif
@@ -496,8 +496,8 @@ static int vk_modify(struct ev *e, struct input_event *ev)
}
#ifdef _EVENT_LOGGING
- if (ev->type == EV_SYN && ev->code == SYN_REPORT) LOGI("EV: %s => EV_SYN SYN_REPORT\n", e->deviceName);
- if (ev->type == EV_SYN && ev->code == SYN_MT_REPORT) LOGI("EV: %s => EV_SYN SYN_MT_REPORT\n", e->deviceName);
+ if (ev->type == EV_SYN && ev->code == SYN_REPORT) printf("EV: %s => EV_SYN SYN_REPORT\n", e->deviceName);
+ if (ev->type == EV_SYN && ev->code == SYN_MT_REPORT) printf("EV: %s => EV_SYN SYN_MT_REPORT\n", e->deviceName);
#endif
// Discard the MT versions
@@ -555,7 +555,7 @@ static int vk_modify(struct ev *e, struct input_event *ev)
#endif
#ifdef _EVENT_LOGGING
- LOGI("EV: x: %d y: %d\n", x, y);
+ printf("EV: x: %d y: %d\n", x, y);
#endif
// Clear the current sync states
diff --git a/minuitwrp/graphics.c b/minuitwrp/graphics.c
index 61a98c3f7..627e34392 100644
--- a/minuitwrp/graphics.c
+++ b/minuitwrp/graphics.c
@@ -79,14 +79,14 @@ static struct fb_fix_screeninfo fi;
#ifdef PRINT_SCREENINFO
static void print_fb_var_screeninfo()
{
- LOGI("vi.xres: %d\n", vi.xres);
- LOGI("vi.yres: %d\n", vi.yres);
- LOGI("vi.xres_virtual: %d\n", vi.xres_virtual);
- LOGI("vi.yres_virtual: %d\n", vi.yres_virtual);
- LOGI("vi.xoffset: %d\n", vi.xoffset);
- LOGI("vi.yoffset: %d\n", vi.yoffset);
- LOGI("vi.bits_per_pixel: %d\n", vi.bits_per_pixel);
- LOGI("vi.grayscale: %d\n", vi.grayscale);
+ printf("vi.xres: %d\n", vi.xres);
+ printf("vi.yres: %d\n", vi.yres);
+ printf("vi.xres_virtual: %d\n", vi.xres_virtual);
+ printf("vi.yres_virtual: %d\n", vi.yres_virtual);
+ printf("vi.xoffset: %d\n", vi.xoffset);
+ printf("vi.yoffset: %d\n", vi.yoffset);
+ printf("vi.bits_per_pixel: %d\n", vi.bits_per_pixel);
+ printf("vi.grayscale: %d\n", vi.grayscale);
}
#endif
@@ -191,7 +191,7 @@ static int get_framebuffer(GGLSurface *fb)
fb->width = vi.xres;
fb->height = vi.yres;
#ifdef BOARD_HAS_JANKY_BACKBUFFER
- LOGI("setting JANKY BACKBUFFER\n");
+ printf("setting JANKY BACKBUFFER\n");
fb->stride = fi.line_length/2;
#else
fb->stride = vi.xres_virtual;
diff --git a/minuitwrp/resources.c b/minuitwrp/resources.c
index ea6a44752..4c8d8a93f 100644
--- a/minuitwrp/resources.c
+++ b/minuitwrp/resources.c
@@ -30,7 +30,7 @@
#include <pixelflinger/pixelflinger.h>
#include <png.h>
-#include <jpeglib.h>
+#include "../libjpegtwrp/jpeglib.h"
#include "minui.h"