summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Blundell <pb@reciva.com>2004-06-02 20:49:50 +0000
committerPhil Blundell <pb@reciva.com>2004-06-02 20:49:50 +0000
commit6741fadc52598af0096f106a2cefd640abb434b3 (patch)
tree033bc6f3be3dc7bd7fca234f5906cf77d2448877
parentd4d0c8470c4272dec642ab4c68f44a83cda06971 (diff)
New conditional. (REQUIRED_MODULES): Demand xcalibrateext if building
XCalibrate. New file. Add xcalibrate.c. Read raw events if requested.
-rw-r--r--hw/kdrive/linux/tslib.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/hw/kdrive/linux/tslib.c b/hw/kdrive/linux/tslib.c
index 7d8bfdf84..db29976c9 100644
--- a/hw/kdrive/linux/tslib.c
+++ b/hw/kdrive/linux/tslib.c
@@ -62,7 +62,8 @@
static long lastx = 0, lasty = 0;
static struct tsdev *tsDev = NULL;
-/* extern int TSLibWantRawData; */
+void (*tslib_raw_event_hook)(int x, int y, int pressure, void *closure);
+void *tslib_raw_event_closure;
int KdTsPhyScreen = 0;
@@ -75,11 +76,14 @@ TsRead (int tsPort, void *closure)
long x, y;
unsigned long flags;
- /*
- if (TSLibWantRawData)
- n = ts_read_raw(tsDev, &event, 1);
- else
- */
+ if (tslib_raw_event_hook)
+ {
+ if (ts_read_raw(tsDev, &event, 1) == 1)
+ {
+ tslib_raw_event_hook (event.x, event.y, event.pressure, tslib_raw_event_closure);
+ }
+ return;
+ }
n = ts_read(tsDev, &event, 1);