board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / package / input-tools / 0001-rint.patch
blobb2aa13f760bf4009d4fde3612c9121038e4e9477
1 diff -urN joystick-20051019.orig/utils/jscal.c joystick-20051019/utils/jscal.c
2 --- joystick-20051019.orig/utils/jscal.c 2004-10-19 09:51:52.000000000 +0200
3 +++ joystick-20051019/utils/jscal.c 2009-01-18 10:48:50.000000000 +0100
4 @@ -141,10 +141,10 @@
5 c = 32767.0 / (inputs.cmin[1] - inputs.cmax[0]);
6 d = 32767.0 / (inputs.cmin[2] - inputs.cmax[1]);
8 - results[0] = rint(a);
9 - results[1] = rint(b);
10 - results[2] = rint(c*16384.0);
11 - results[3] = rint(d*16384.0);
12 + results[0] = (int) (a + 0.5);
13 + results[1] = (int) (b + 0.5);
14 + results[2] = (int) (c*16384.0 + 0.5);
15 + results[3] = (int) (d*16384.0 + 0.5);
17 return 1;