SDL_GameControllerGetButton always return 0

Hi,
I’m trying to upgrade our code to use SDL 2 to get haptic response.

Haptic works great and SDL_GameControllerGetAxis returns proper values. But SDL_GameControllerGetButton always returns 0 no matter what. I do call SDL_GameControllerUpdate once every frame and I did initialize SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC)

I’m using a standard wired 360 controller.

Any ideas what I might be doing wrong? I’m only using SDL for controller support.

Do you have the same problem with the testgamecontroller test program (in
the test subdirectory of the source archive?)

If so, can you post more information about your OS, the game controller
you’re using, etc?

If not, can you post a minimal example that that we can build that shows
the problem?

Also, you can report a bug on bugzilla so it doesn’t get lost in the sands
of time:
http://bugzilla.libsdl.org/

Cheers!On Fri, Jun 21, 2013 at 8:17 AM, jfmajor wrote:

**
Hi,
I’m trying to upgrade our code to use SDL 2 to get haptic response.

Haptic works great and SDL_GameControllerGetAxis returns proper values.
But SDL_GameControllerGetButton always returns 0 no matter what. I do call
SDL_GameControllerUpdate once every frame and I did initialize
SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_GAMECONTROLLER |
SDL_INIT_HAPTIC)

I’m using a standard wired 360 controller.

Any ideas what I might be doing wrong? I’m only using SDL for controller
support.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org