diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2016-02-10 05:49:51 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2016-02-10 05:49:51 +0000 |
commit | 7150eb3de381ea36cb360b8972c9ef81b143c268 (patch) | |
tree | d2b41f773c1a23cc852a8f54ee5e8e07edfed433 /sys/dev | |
parent | 2552db1a3d486f404a30f2dc9bb1dd95fd3d0e63 (diff) |
Permit negative x and y coordinates in mouse.scale for uts and ums.
Needed by some touchscreens.
no objection matthieu@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/hid/hidms.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/uts.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/hid/hidms.c b/sys/dev/hid/hidms.c index e52c3cb7622..bc9b39d4fc8 100644 --- a/sys/dev/hid/hidms.c +++ b/sys/dev/hid/hidms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hidms.c,v 1.1 2016/01/08 15:54:13 jcs Exp $ */ +/* $OpenBSD: hidms.c,v 1.2 2016/02/10 05:49:50 guenther Exp $ */ /* $NetBSD: ums.c,v 1.60 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -429,8 +429,8 @@ hidms_ioctl(struct hidms *ms, u_long cmd, caddr_t data, int flag, switch (cmd) { case WSMOUSEIO_SCALIBCOORDS: - if (!(wsmc->minx >= 0 && wsmc->maxx >= 0 && - wsmc->miny >= 0 && wsmc->maxy >= 0 && + if (!(wsmc->minx >= -32768 && wsmc->maxx >= -32768 && + wsmc->miny >= -32768 && wsmc->maxy >= -32768 && wsmc->resx >= 0 && wsmc->resy >= 0 && wsmc->minx < 32768 && wsmc->maxx < 32768 && wsmc->miny < 32768 && wsmc->maxy < 32768 && diff --git a/sys/dev/usb/uts.c b/sys/dev/usb/uts.c index 0c83fe7189a..cc13d844f33 100644 --- a/sys/dev/usb/uts.c +++ b/sys/dev/usb/uts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uts.c,v 1.36 2015/03/14 03:38:50 jsg Exp $ */ +/* $OpenBSD: uts.c,v 1.37 2016/02/10 05:49:50 guenther Exp $ */ /* * Copyright (c) 2007 Robert Nagy <robert@openbsd.org> @@ -325,8 +325,8 @@ uts_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *l) switch (cmd) { case WSMOUSEIO_SCALIBCOORDS: - if (!(wsmc->minx >= 0 && wsmc->maxx >= 0 && - wsmc->miny >= 0 && wsmc->maxy >= 0 && + if (!(wsmc->minx >= -32768 && wsmc->maxx >= 0 && + wsmc->miny >= -32768 && wsmc->maxy >= 0 && wsmc->resx >= 0 && wsmc->resy >= 0 && wsmc->minx < 32768 && wsmc->maxx < 32768 && wsmc->miny < 32768 && wsmc->maxy < 32768 && |