From 365a22c63cb292ea494f39ebc48a37e322e5eb14 Mon Sep 17 00:00:00 2001 From: runge Date: Tue, 21 Dec 2010 12:04:02 -0500 Subject: x11vnc: touchscreen uinput support and Java viewer mousewheel support. See x11vnc/ChangeLog for rest. --- x11vnc/v4l.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'x11vnc/v4l.c') 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) { -- cgit v1.2.1