Adjust touchscreen coordinate to adapt to Qt app.
This commit is contained in:
parent
4627b875ab
commit
9911f975e2
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue