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 2148 - [PATCH] Non-udev in joystick in Linux does not push JOYDEVICEADDED event
Summary: [PATCH] Non-udev in joystick in Linux does not push JOYDEVICEADDED event
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: HG 2.1
Hardware: x86 Mac OS X 10.8
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-11 10:18 UTC by Joseph Carter
Modified: 2013-10-11 13:13 UTC (History)
1 user (show)

See Also:


Attachments
Send SDL_JOYDEVICEADDED with or without udev (3.75 KB, patch)
2013-10-11 10:18 UTC, Joseph Carter
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Carter 2013-10-11 10:18:41 UTC
Created attachment 1363 [details]
Send SDL_JOYDEVICEADDED with or without udev

Now that we've agreed the Windows mmjoystick driver is to be nuked (reminder: Nuke Windows mmjoystick driver…) Linux without udev is the only supported joystick target that does not fire off an event whenever it finds a joystick (basically at InitSubSystem time in this case.)  Without libudev, we cannot notify the user that a joystick has disappeared or give them notice of any new ones that show up, but our crude scan should be consistent and report the what it finds.

This patch does not address the FIXME regarding creation of SDL_PrivateJoyDeviceAdded and SDL_PrivateJoyDeviceRemoved.  I'll do that if desired, but it should be a separate commit.  Just add a note here if you want it.

This patch makes a similar change to where the SDL_JOYDEVICEREMOVED event is fired off, for the sake of consistency.  Tested with and without libudev on Ubuntu 13.04 under VMWare.
Comment 1 Joseph Carter 2013-10-11 13:13:45 UTC
And of course, while I was typing this, it looks like Sam applied the patch already.