Sunday, October 24, 2010

TSLIB patchfile text and link to prepatched version.

Here is the patch that needs to be applied to TSLIB to get it to run on the TS-TPC-7390 and TS-TPC-7395. You can run this patch on a stock version and you should be good to go. You can also get a pre-patched version from Donal O'connor Here: http://automon.donaloconnor.net/files/tslib-1.0.zip


If you want to run the patch yourself, here is the text of the patch file you need to create (As far as I know, Blogger doesn't have a way to do file uploads so you'll need to copy and paste this into a text file then run the patch command).

--- tslib-1.0/plugins/input-raw.c    2006-08-24 23:02:54.000000000 +0200
+++ tslib-1.0.1/plugins/input-raw.c    2008-10-24 09:55:28.000000000 +0200
@@ -97,13 +97,24 @@
                 case BTN_TOUCH:
                     if (ev.value == 0) {
                         /* pen up */
-                        samp->x = 0;
-                        samp->y = 0;
+                        /* use last i->current_x and i->current_y values */
+                        samp->x = i->current_x;
+                        samp->y = i->current_y;
                         samp->pressure = 0;
                         samp->tv = ev.time;
                         samp++;
                         total++;
                     }
+                    else if (ev.value == 1) {
+                        /* pen down */
+                        /* use last i->current_x and i->current_y values */
+                        samp->x = i->current_x;
+                        samp->y = i->current_y;
+                        samp->pressure = 1;
+                        samp->tv = ev.time;
+                        samp++;
+                        total++;
+                    }
                     break;
                 }
                 break;

No comments:

Post a Comment