From: Chidambar Zinnoury Date: Wed, 28 Oct 2015 16:17:54 +0000 (+0100) Subject: ecore fb: Use a default tslib device when none is specified through the environment... X-Git-Tag: upstream/1.16.0~61 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a42d2fef6971d85a6962f0b8a94cc32398772f6a;p=platform%2Fupstream%2Fefl.git ecore fb: Use a default tslib device when none is specified through the environment variable TSLIB_TSDEVICE. It seems that tslib’s applications has been using /dev/input/event0 as default device for more than a decade. Let’s use the same one. --- diff --git a/src/lib/ecore_fb/ecore_fb_ts.c b/src/lib/ecore_fb/ecore_fb_ts.c index b9880ec..f34d41a 100644 --- a/src/lib/ecore_fb/ecore_fb_ts.c +++ b/src/lib/ecore_fb/ecore_fb_ts.c @@ -83,12 +83,12 @@ ecore_fb_ts_init(void) { #ifdef HAVE_TSLIB char *tslib_tsdevice = NULL; - if ( #if defined(HAVE_GETUID) && defined(HAVE_GETEUID) - (getuid() == geteuid()) && + if (getuid() == geteuid()) #endif - ((tslib_tsdevice = getenv("TSLIB_TSDEVICE")))) { + if ((tslib_tsdevice = getenv("TSLIB_TSDEVICE")) == NULL) + tslib_tsdevice = "/dev/input/event0"; printf( "ECORE_FB: TSLIB_TSDEVICE = '%s'\n", tslib_tsdevice ); _ecore_fb_tslib_tsdev = ts_open( tslib_tsdevice, 1 ); /* 1 = nonblocking, 0 = blocking */