From 64ed78a30fd240216123543dd8267ec08c43b70f Mon Sep 17 00:00:00 2001 From: chrox Date: Thu, 15 Jan 2015 22:20:52 +0800 Subject: [PATCH] disable top panel in pocketbook --- Makefile.defs | 1 + input.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile.defs b/Makefile.defs index 563e4e6c4..de9d1b217 100644 --- a/Makefile.defs +++ b/Makefile.defs @@ -44,6 +44,7 @@ else ifeq ($(TARGET), win32) else ifeq ($(TARGET), pocketbook) CHOST?=arm-obreey-linux-gnueabi export POCKETBOOK=1 + export PATH:=$(CURDIR)/$(POCKETBOOK_TOOLCHAIN)/bin:$(PATH) export SYSROOT=$(CURDIR)/$(POCKETBOOK_TOOLCHAIN)/arm-obreey-linux-gnueabi/sysroot endif diff --git a/input.c b/input.c index 99ae7b99f..f5f3676d9 100644 --- a/input.c +++ b/input.c @@ -85,8 +85,13 @@ static inline void genEmuEvent(int fd, int type, int code, int value) { } int pb_event_handler(int type, int par1, int par2) { - //printf("ev:%d %d %d\n", type, par1, par2); - //fflush(stdout); + printf("ev:%d %d %d\n", type, par1, par2); + fflush(stdout); + // general settings in only possible in forked process + if (type == EVT_INIT) { + SetPanelType(PANEL_DISABLED); + } + if (type == EVT_POINTERDOWN) { is_in_touch = 1; genEmuEvent(inputfds[0], EV_ABS, ABS_MT_TRACKING_ID, 0); @@ -102,6 +107,8 @@ int pb_event_handler(int type, int par1, int par2) { } else if (type == EVT_POINTERUP) { is_in_touch = 0; genEmuEvent(inputfds[0], EV_ABS, ABS_MT_TRACKING_ID, -1); + } else { + genEmuEvent(inputfds[0], type, par1, par2); } return 0; }