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 - SDL_JoystickGetButton returns 0 for every button (after migrating from 1.2 to 2.0.1)
Summary: SDL_JoystickGetButton returns 0 for every button (after migrating from 1.2 to...
Status: RESOLVED WORKSFORME
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: 2.0.1
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-22 12:44 UTC by Matthias Varnholt
Modified: 2014-01-22 14:59 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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