Add a default touchscreen path

When enabling the touchscreen, open /dev/input/touchscreen0 if no path was
specified.
This commit is contained in:
Ross Burton 2008-04-22 16:37:02 +01:00
parent b44e89f468
commit 20a90bef8b

View File

@ -114,6 +114,10 @@ TslibEnable (KdPointerInfo *pi)
private->raw_event_hook = NULL;
private->raw_event_closure = NULL;
if (!pi->path) {
pi->path = "/dev/input/touchscreen0";
ErrorF("[tslib/TslibEnable] no device path given, trying %s\n", pi->path);
}
private->tsDev = ts_open(pi->path, 0);
private->fd = ts_fd(private->tsDev);
if (!private->tsDev || ts_config(private->tsDev) || private->fd < 0) {