From e0468b06f56de1582257e89b38de18a8b6eb65b0 Mon Sep 17 00:00:00 2001 From: victor Date: Thu, 16 Mar 2017 11:10:50 +0900 Subject: [PATCH] patch for rotating tslib axis --- .../package/qt5/qt5base/0009-tslib-rotation.patch | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 buildroot/buildroot-2016.08.1/package/qt5/qt5base/0009-tslib-rotation.patch diff --git a/buildroot/buildroot-2016.08.1/package/qt5/qt5base/0009-tslib-rotation.patch b/buildroot/buildroot-2016.08.1/package/qt5/qt5base/0009-tslib-rotation.patch new file mode 100644 index 0000000..a7f2a81 --- /dev/null +++ b/buildroot/buildroot-2016.08.1/package/qt5/qt5base/0009-tslib-rotation.patch @@ -0,0 +1,24 @@ +diff -Naur a/src/platformsupport/input/tslib/qtslib.cpp b/src/platformsupport/input/tslib/qtslib.cpp +--- a/src/platformsupport/input/tslib/qtslib.cpp 2017-03-09 13:56:15.106194306 +0900 ++++ b/src/platformsupport/input/tslib/qtslib.cpp 2017-03-09 13:55:49.937693339 +0900 +@@ -121,12 +121,16 @@ + if (dx*dx <= 4 && dy*dy <= 4 && pressed == m_pressed) + continue; + } +- QPoint pos(x, y); ++ ++ int xn = 900 - y; ++ int yn = x; ++ ++ QPoint pos(xn, yn); + + QWindowSystemInterface::handleMouseEvent(0, pos, pos, pressed ? Qt::LeftButton : Qt::NoButton); + +- m_x = x; +- m_y = y; ++ m_x = xn; ++ m_y = yn; + m_pressed = pressed; + } + } + -- 2.1.4