We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2359

Summary: SDL_JoystickGetButton returns 0 for every button (after migrating from 1.2 to 2.0.1)
Product: SDL Reporter: Matthias Varnholt <matto>
Component: joystickAssignee: Sam Lantinga <slouken>
Status: RESOLVED WORKSFORME QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.1   
Hardware: x86_64   
OS: Linux   

Description Matthias Varnholt 2014-01-22 12:44:18 UTC
I read 0 for every button:

----

   for (int i = 0; i < SDL_JoystickNumButtons(mActiveJoystick); i++)
      info.addButtonState(SDL_JoystickGetButton(mActiveJoystick, i));

----

uname -a
Linux varnholt 3.0.0-32-generic #51-Ubuntu SMP Thu Mar 21 15:50:59 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

----

I installed version 2.0.1 by just extracting, build and installing the source archive.
Comment 1 Matthias Varnholt 2014-01-22 12:46:06 UTC
joystick type: "Zeroplus Xbox Controller"
Comment 2 Matthias Varnholt 2014-01-22 12:48:53 UTC
Reading axes and hats is still working fine though.
Comment 3 Matthias Varnholt 2014-01-22 14:59:57 UTC
SDL_INIT_VIDEO was used though gl context was created by Qt