summaryrefslogtreecommitdiffstats
path: root/x11vnc/v4l.c
diff options
context:
space:
mode:
authorrunge <runge@karlrunge.com>2010-12-21 12:04:02 -0500
committerrunge <runge@karlrunge.com>2010-12-21 12:04:02 -0500
commit365a22c63cb292ea494f39ebc48a37e322e5eb14 (patch)
treeca6e87ab396ee00a837b09b2c6cede62aec69dae /x11vnc/v4l.c
parentd4fabc217e8cd02aca4d248229bb8a030b2bbfe2 (diff)
downloadlibvncserver-365a22c63cb292ea494f39ebc48a37e322e5eb14.zip
libvncserver-365a22c63cb292ea494f39ebc48a37e322e5eb14.tar.gz
x11vnc: touchscreen uinput support and Java viewer mousewheel support. See x11vnc/ChangeLog for rest.
Diffstat (limited to 'x11vnc/v4l.c')
-rw-r--r--x11vnc/v4l.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/x11vnc/v4l.c b/x11vnc/v4l.c
index 84bfd08..86c33a6 100644
--- a/x11vnc/v4l.c
+++ b/x11vnc/v4l.c
@@ -434,23 +434,23 @@ static void apply_settings(char *dev, char *settings, int *fd) {
static double dval = 0.05;
static int v4l1_dpct(int old, int d) {
- int new, max = V4L1_MAX;
+ int newval, max = V4L1_MAX;
/* -1 and 1 are special cases for "small increments" */
if (d == -1) {
- new = old - (int) (dval * max);
+ newval = old - (int) (dval * max);
} else if (d == 1) {
- new = old + (int) (dval * max);
+ newval = old + (int) (dval * max);
} else {
- new = (d * max)/100;
+ newval = (d * max)/100;
}
- if (new < 0) {
- new = 0;
+ if (newval < 0) {
+ newval = 0;
}
- if (new > max) {
- new = max;
+ if (newval > max) {
+ newval = max;
}
- return new;
+ return newval;
}
static void v4l_requery(void) {
OpenPOWER on IntegriCloud