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 3184

Summary: SDL_JOYBUTTONDOWN event never received
Product: SDL Reporter: jintiao
Component: joystickAssignee: Sam Lantinga <slouken>
Status: RESOLVED ABANDONED QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2 CC: Littlefighter19, philipp.wiesemann
Version: 2.0.3   
Hardware: All   
OS: Android (All)   
Attachments: test code

Description jintiao 2015-11-20 02:58:34 UTC
Created attachment 2310 [details]
test code

this bug is test on nvidia shield android tv with a shield controller.
when init sdl using SDL_Init (SDL_INIT_JOYSTICK | SDL_INIT_VIDEO), you will never get a SDL_JOYBUTTONDOWN event(SDL_JOYBUTTONUP is fine).
but with SDL_Init (SDL_INIT_JOYSTICK), everything works perfectly.
Comment 1 Philipp Wiesemann 2015-11-20 20:52:57 UTC
Thank you for reporting this problem.

There was a (maybe) similar problem some time ago in bug 2438.
Comment 2 jintiao 2015-11-23 08:42:39 UTC
so now I use
SDL_SetHint (SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
as a workaround, thanks sergio-br2.

ps: I've try the latest code(SDL-2.0.4-9901.zip), things are getting worse, both SDL_JOYBUTTONDOWN and SDL_JOYBUTTONUP are gone :(
Comment 3 Littlefighter19 2016-01-16 16:51:07 UTC
*** Bug 3240 has been marked as a duplicate of this bug. ***
Comment 4 Ryan C. Gordon 2018-08-06 21:20:19 UTC
Hello, and sorry if you're getting dozens of copies of this message by email.

We are closing out bugs that appear to be abandoned in some form. This can happen for lots of reasons: we couldn't reproduce it, conversation faded out, the bug was noted as fixed in a comment but we forgot to mark it resolved, the report is good but the fix is impractical, we fixed it a long time ago without realizing there was an associated report, etc.

Individually, any of these bugs might have a better resolution (such as WONTFIX or WORKSFORME or INVALID) but we've added a new resolution of ABANDONED to make this easily searchable and make it clear that it's not necessarily unreasonable to revive a given bug report.

So if this bug is still a going concern and you feel it should still be open: please feel free to reopen it! But unless you respond, we'd like to consider these bugs closed, as many of them are several years old and overwhelming our ability to prioritize recent issues.

(please note that hundred of bug reports were sorted through here, so we apologize for any human error. Just reopen the bug in that case!)

Thanks,
--ryan.