From 9911f975e29c7534234bb110304dfc6e1f912ef4 Mon Sep 17 00:00:00 2001 From: lijie02 Date: Tue, 22 Jan 2019 14:59:15 +0800 Subject: [PATCH] Adjust touchscreen coordinate to adapt to Qt app. --- .../linux-4.9/drivers/input/touchscreen/gt9xxnew/gt9xx.c | 7 +++---- package/qt/qt5/files/qt-env.sh | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lichee/linux-4.9/drivers/input/touchscreen/gt9xxnew/gt9xx.c b/lichee/linux-4.9/drivers/input/touchscreen/gt9xxnew/gt9xx.c index 81d142805..5250a35ff 100755 --- a/lichee/linux-4.9/drivers/input/touchscreen/gt9xxnew/gt9xx.c +++ b/lichee/linux-4.9/drivers/input/touchscreen/gt9xxnew/gt9xx.c @@ -631,16 +631,15 @@ Output: static void gtp_touch_down(struct goodix_ts_data* ts,s32 id,s32 x,s32 y,s32 w) { dprintk(DEBUG_X_Y_INFO, "source data:ID:%d, X:%d, Y:%d, W:%d\n", id, x, y, w); - //if(1 == exchange_x_y_flag){ - // swap(x, y); - //} + if(1 == exchange_x_y_flag){ + swap(x, y); + } //if(1 == revert_x_flag){ // x = SCREEN_MAX_X - x; //} //if(1 == revert_y_flag){ // y = SCREEN_MAX_Y - y; //} - x = GTP_MAX_WIDTH - x; dprintk(DEBUG_X_Y_INFO,"report data:ID:%d, X:%d, Y:%d, W:%d\n", id, x, y, w); diff --git a/package/qt/qt5/files/qt-env.sh b/package/qt/qt5/files/qt-env.sh index 7a395924b..e07c57d4b 100755 --- a/package/qt/qt5/files/qt-env.sh +++ b/package/qt/qt5/files/qt-env.sh @@ -1,12 +1,12 @@ #!/bin/sh -export QT_QPA_PLATFORM=eglfs:size=854x480 +export QT_QPA_PLATFORM=linuxfb:size=854x480 export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/qt5/plugins export QT_QPA_FONTDIR=/usr/lib/fonts export QT_QPA_GENERIC_PLUGINS=tslib -export QT_QPA_EGLFS_INTEGRATION=none +#export QT_QPA_EGLFS_INTEGRATION=none export XDG_RUNTIME_DIR=/dev/shm #export QT_QPA_GENERIC_PLUGINS=evdevmouse:/dev/input/event1 export QT_QPA_GENERIC_PLUGINS=evdevkeyboard:/dev/input/event0 -export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event3 -export QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/input/event3 +export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event4:rotate=90 +export QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/input/event4