lbry-android-sdk/p4a/pythonforandroid/recipes/pygame/patches/fix-sdl-spam-log.patch

48 lines
1.6 KiB
Diff
Raw Normal View History

2017-08-13 03:24:00 +02:00
--- pygame-1.9.1release/src/joystick.c.orig
+++ pygame-1.9.1release/src/joystick.c
@@ -201,7 +201,7 @@ joy_get_axis (PyObject* self, PyObject* args)
}
value = SDL_JoystickGetAxis (joy, axis);
- printf("SDL_JoystickGetAxis value:%d:\n", value);
+/* printf("SDL_JoystickGetAxis value:%d:\n", value); */
return PyFloat_FromDouble (value / 32768.0);
@@ -241,7 +241,7 @@ joy_get_button (PyObject* self, PyObject* args)
}
value = SDL_JoystickGetButton (joy, _index);
- printf("SDL_JoystickGetButton value:%d:\n", value);
+/* printf("SDL_JoystickGetButton value:%d:\n", value); */
return PyInt_FromLong (value);
}
@@ -277,7 +277,7 @@ joy_get_ball (PyObject* self, PyObject* args)
return RAISE (PyExc_SDLError, "Joystick not initialized");
}
value = SDL_JoystickNumBalls (joy);
- printf("SDL_JoystickNumBalls value:%d:\n", value);
+/* printf("SDL_JoystickNumBalls value:%d:\n", value); */
if (_index < 0 || _index >= value) {
return RAISE (PyExc_SDLError, "Invalid joystick trackball");
@@ -300,7 +300,7 @@ joy_get_numhats (PyObject* self)
}
value = SDL_JoystickNumHats (joy);
- printf("SDL_JoystickNumHats value:%d:\n", value);
+/* printf("SDL_JoystickNumHats value:%d:\n", value); */
return PyInt_FromLong (value);
}
@@ -327,7 +327,7 @@ joy_get_hat (PyObject* self, PyObject* args)
px = py = 0;
value = SDL_JoystickGetHat (joy, _index);
- printf("SDL_JoystickGetHat value:%d:\n", value);
+/* printf("SDL_JoystickGetHat value:%d:\n", value); */
if (value & SDL_HAT_UP) {
py = 1;