1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
diff -Nur a/src/joystick.c b/src/joystick.c
--- a/src/joystick.c 2016-07-27 20:51:54.070634066 -0300
+++ b/src/joystick.c 2016-07-27 20:54:56.250440937 -0300
@@ -200,10 +200,7 @@
return RAISE (PyExc_SDLError, "Invalid joystick axis");
}
- value = SDL_JoystickGetAxis (joy, axis);
-#ifdef DEBUG
- /*printf("SDL_JoystickGetAxis value:%d:\n", value);*/
-#endif
+ printf("SDL_JoystickGetAxis value:%d:\n", value);
return PyFloat_FromDouble (value / 32768.0);
}
@@ -241,10 +238,7 @@
return RAISE (PyExc_SDLError, "Invalid joystick button");
}
- value = SDL_JoystickGetButton (joy, _index);
-#ifdef DEBUG
- /*printf("SDL_JoystickGetButton value:%d:\n", value);*/
-#endif
+ printf("SDL_JoystickGetButton value:%d:\n", value);
return PyInt_FromLong (value);
}
@@ -278,10 +272,7 @@
if (!joy) {
return RAISE (PyExc_SDLError, "Joystick not initialized");
}
- value = SDL_JoystickNumBalls (joy);
-#ifdef DEBUG
- /*printf("SDL_JoystickNumBalls value:%d:\n", value);*/
-#endif
+ printf("SDL_JoystickNumBalls value:%d:\n", value);
if (_index < 0 || _index >= value) {
return RAISE (PyExc_SDLError, "Invalid joystick trackball");
}
@@ -302,10 +293,7 @@
return RAISE (PyExc_SDLError, "Joystick not initialized");
}
- value = SDL_JoystickNumHats (joy);
-#ifdef DEBUG
- /*printf("SDL_JoystickNumHats value:%d:\n", value);*/
-#endif
+ printf("SDL_JoystickNumHats value:%d:\n", value);
return PyInt_FromLong (value);
}
@@ -330,10 +318,7 @@
}
px = py = 0;
- value = SDL_JoystickGetHat (joy, _index);
-#ifdef DEBUG
- /*printf("SDL_JoystickGetHat value:%d:\n", value);*/
-#endif
+ printf("SDL_JoystickGetHat value:%d:\n", value);
if (value & SDL_HAT_UP) {
py = 1;
}
|