Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian bug report: Left/Right Joystick Axis doesn't work with some controllers #1131

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Labels
duplicate This issue or pull request already exists

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

Reported in version: 2.0.0
Reported for operating system, platform: Linux, x86_64

Comments on the original bug report:

On 2013-10-19 19:44:16 +0000, wrote:

This was reported with 1.2 but I think that it persists with 2.0, and we are applying the patch in 2.0, so I am posting in the case that it's useful or to remove it in 2.0 if not necessary or fixed by another means.

Original bug report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=673324

Excepts:

./testjoystick

There are 1 joysticks attached
Joystick 0: Sony PLAYSTATION(R)3 Controller
axes: 4
balls: 0
hats: 0
buttons: 19

./testjoystick "Sony PLAYSTATION(R)3 Controller"

I don't see any reactions when moving the stick left or right. I downgraded to
the version 1.2.14-6.1 of libsdl1.2debian from squeeze. The binary started to
work without any problems. I would guess that this makes the bug a regression.
An update to 1.2.15-3 instantly reintroduced the problem.

The problem is known since a while and not fixed in svn (but user fixed it):


I don't know if the original submitter was right in pointing to the issue 1460, I made some comments there but Ryan didn't think that it was related or fixed the particular problem of 1460.

Still, one of the Debian maintainers of SDL verified the problem with a hardware that he had, and produced a patch, so I think that it can be still useful patch. Hope that helps.


From: Sam Hocevar sam@hocevar.net

Thanks for the report. I could reproduce it with my SixAxis and
fixed the bug properly. It'll be in the next Debian upload.


Index: libsdl2/src/joystick/linux/SDL_sysjoystick.c

--- a/src/joystick/linux/SDL_sysjoystick.c 2012-05-18 00:51:07.758390396 +0200
+++ b/src/joystick/linux/SDL_sysjoystick.c 2012-05-18 00:51:13.084998927 +0200
@@ -703,7 +703,7 @@
++joystick->nbuttons;
}
}

  •    for (i = 0; i < ABS_MISC; ++i) {
    
  •    for (i = 0; i < ABS_MAX; ++i) {
           /* Skip hats */
           if (i == ABS_HAT0X) {
               i = ABS_HAT3Y;
    

Cheers.

On 2013-10-20 06:58:45 +0000, Ryan C. Gordon wrote:

My understanding is that the original problem is we were losing axis data because of a bug that was overwriting Axis 0.

I'll check this again in the morning. The reason this patch wasn't applied was because it was giving me bogus data from a PS3 controller, but later I was wondering if its tilt sensor actually works on Linux, and it was reporting data from that once we checked more axes.

--ryan.

On 2013-10-20 19:26:43 +0000, Ryan C. Gordon wrote:

Ok, I looked at this again. PS3 controller works, just doesn't report the tilt sensors (or what I assume is the tilt sensors) without the Debian patch, so I'm just merging this bug with Bug # 1460 for now.

(I can't speak for 1.2 at the moment, but this is true for 2.0.0.)

--ryan.

*** This bug has been marked as a duplicate of bug 1460 ***

On 2013-10-20 21:05:55 +0000, wrote:

Hmm, I am confused. You merged the report with the previous one so now it's RESOLVED-DUPLICATE (and not present/applied in the version control system), but still you think that the patch is useful because otherwise tilting doesn't work.

I assume that you will review the issue later, but in the meantime, we will keep shipping with the patch -- until/unless something new arises in these bug reports, e.g. a better patch.

Does this sound sensible?

Thanks for looking at this and so quickly.

On 2013-10-21 04:52:05 +0000, Ryan C. Gordon wrote:

I assume that you will review the issue later, but in the meantime, we will
keep shipping with the patch -- until/unless something new arises in these
bug reports, e.g. a better patch.

For SDL 2.1.0, we're planning to discuss revamps to the joystick API to deal with more general purpose things, like guitar hero controllers and wiimotes, etc. It's not clear what will come from that yet, though. In the worst case, we'll probably merge this patch eventually. It's safe for Debian to keep shipping it in the meantime.

--ryan.

@SDLBugzilla SDLBugzilla added bug duplicate This issue or pull request already exists labels Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

1 participant