- // the kernel might support and return less keys then we know about,
- // so make sure the buffer is clear.
+#if SDL_INPUT_TSLIB
+ /* start with touchscreen so that we can skip it later */
+ osdl_tslib_dev = ts_open(SDL_getenv("TSLIB_TSDEVICE"), 1);
+ if (ts_config(osdl_tslib_dev) < 0) {
+ ts_close(osdl_tslib_dev);
+ osdl_tslib_dev = NULL;
+ }
+ if (osdl_tslib_dev != NULL) {
+ osdl_tslib_fd = ts_fd(osdl_tslib_dev);
+ osdl_evdev_devs[osdl_evdev_dev_count++] = osdl_tslib_fd;
+ if (fstat(osdl_tslib_fd, &stat_buf) == -1)
+ perror("fstat ts");
+ else
+ touchscreen_ino = stat_buf.st_ino;
+ printf("opened tslib touchscreen\n");
+ }
+#endif
+
+ /* the kernel might support and return less keys then we know about,
+ * so make sure the buffer is clear. */