aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMinecrell <minecrell@minecrell.net>2020-02-04 21:50:08 +0100
committerLeo <thinkabit.ukim@gmail.com>2020-02-07 08:32:54 +0100
commit0bf794b2c46b5c6e405de4ff65af0ae821654785 (patch)
treeff91cd523683679a29514249c9fca219328bc920
parent0fc426b00c1582a1d9a88d332b8cbe386f11b7ba (diff)
downloadaports-0bf794b2c46b5c6e405de4ff65af0ae821654785.tar.bz2
aports-0bf794b2c46b5c6e405de4ff65af0ae821654785.tar.xz
main/directfb: Add patch to automatically detect touchscreens using tslib
-rw-r--r--main/directfb/0007-tslib-Automatically-detect-touchscreens-using-ts_setup.patch31
-rw-r--r--main/directfb/APKBUILD6
2 files changed, 35 insertions, 2 deletions
diff --git a/main/directfb/0007-tslib-Automatically-detect-touchscreens-using-ts_setup.patch b/main/directfb/0007-tslib-Automatically-detect-touchscreens-using-ts_setup.patch
new file mode 100644
index 0000000000..d84cc93e06
--- /dev/null
+++ b/main/directfb/0007-tslib-Automatically-detect-touchscreens-using-ts_setup.patch
@@ -0,0 +1,31 @@
+diff --git a/inputdrivers/tslib/tslib.c b/inputdrivers/tslib/tslib.c
+index a06cd68c6..8d355a804 100644
+--- a/inputdrivers/tslib/tslib.c
++++ b/inputdrivers/tslib/tslib.c
+@@ -152,6 +152,7 @@ driver_get_available(void)
+ {
+ int i;
+ char *tsdev;
++ struct tsdev *ts;
+
+ /* Use the devices specified in the configuration. */
+ if (fusion_vector_has_elements( &dfb_config->tslib_devices )) {
+@@ -168,10 +169,15 @@ driver_get_available(void)
+ return num_devices;
+ }
+
+- /* Check for environment variable. */
+- tsdev = getenv( "TSLIB_TSDEVICE" );
+- if (tsdev && check_device( tsdev ))
++ /* Ask tslib for a device (TSLIB_TSDEVICE is checked in ts_setup) */
++ ts = ts_setup( NULL, 0 );
++ if (ts) {
++ /* No need to check_device() - already done by tslib */
++ tsdev = ts_get_eventpath( ts );
++ D_INFO( "DirectFB/tslib: Found touchscreen: '%s'\n", tsdev );
+ device_names[num_devices++] = D_STRDUP( tsdev );
++ ts_close( ts );
++ }
+
+ /* Try to guess some (more) devices. */
+ for (i = 0; i < MAX_TSLIB_DEVICES; i++) {
diff --git a/main/directfb/APKBUILD b/main/directfb/APKBUILD
index 7d3aea320d..3b069d25d7 100644
--- a/main/directfb/APKBUILD
+++ b/main/directfb/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=directfb
pkgver=1.7.7
-pkgrel=1
+pkgrel=2
pkgdesc="Library for hw graphics acceleration, input dev, windowing system on top of the Linux fb device"
arch="all"
url="https://github.com/DirectFB/directfb"
@@ -18,6 +18,7 @@ source="
0004-disable-fusion_dispatch.patch
0005-fix-tslib-configure.patch
0006-fix-client-gfx_state-initialisation.patch
+ 0007-tslib-Automatically-detect-touchscreens-using-ts_setup.patch
"
prepare() {
@@ -57,4 +58,5 @@ ed3bf9bf76616174aca6ae92fd9873c9452951b8a2acb60e1ccbbea0c4a7c9766e510899bc8f58c2
bd1d0738c48411e8e065b8a250c1b31334ac65b26a8f6c91d5ad167a4d8fdac1de862c05940567e48fc740dd45fbecf906ebdfbff63420d4f86bee7a3a0746ee 0003-remove-set-gamma-ramp.patch
d68002702f3521a71405bb403b874dced5b123a2de037c9eb05667123a578c0e9a9f13a822fd8d77e31a83f1e1cc8df1d8511f7d2f427688d5ef6ae0fff448c5 0004-disable-fusion_dispatch.patch
c768ca7a4dae7fc0cd7d4fa559ab74adb6b5f21245e0f9b5d56af15b20effc04e6739e86d52d65c902c5e76ad72e966cd9db68f57a9bad11a004525825d443a4 0005-fix-tslib-configure.patch
-6b118928c2ebe58654e1bf32433b084f4dc150526eec1b53f9eb4b856aee25733bd8d6114fde973fcb64416e4146f458cdb75e5836d7507cf802b84e44544462 0006-fix-client-gfx_state-initialisation.patch"
+6b118928c2ebe58654e1bf32433b084f4dc150526eec1b53f9eb4b856aee25733bd8d6114fde973fcb64416e4146f458cdb75e5836d7507cf802b84e44544462 0006-fix-client-gfx_state-initialisation.patch
+43000c629eb24bd6b88d284dc010ea5a2a3facbf9498ab752127c25a890fd52b9a29a09d46264befea9fef19dcfe6f24d6cefa103a68d4c2ab185b6142a5c1b9 0007-tslib-Automatically-detect-touchscreens-using-ts_setup.patch"