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 1937 - allow to distangle the joystick device loop from the video loop
Summary: allow to distangle the joystick device loop from the video loop
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: HG 2.1
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-03 02:40 UTC by nescivi
Modified: 2013-07-06 15:35 UTC (History)
1 user (show)

See Also:


Attachments
patch to fix this (4.17 KB, patch)
2013-07-03 02:40 UTC, nescivi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nescivi 2013-07-03 02:40:01 UTC
Created attachment 1204 [details]
patch to fix this

quite a while ago (before I also subscribed to the mail list), I
submitted a small patch on the forum which allows one to disconnect the
event loop from the video loop, in case one does not need the video
capabilities of SDL. Since SDL is one of the few crossplatform
libraries for HID access, it would be great to have this option. More
arguments for it are in the forum post.

http://forums.libsdl.org/viewtopic.php?t=8855

Unfortunately the patch does not fix it for mouse and keyboard access
yet...
For fixing that, I can highly recommend looking at Chuck's
implementation of HID, which was based on SDL (some years back), but
then adapted for additional features - and disconnecting from the
videoloop.

In other words... it would be great if the input device access could be
decoupled in such a way that it can be used as a separate module.
Comment 1 Philipp Wiesemann 2013-07-06 11:02:02 UTC
Why does SDL_EventInit() has a comment containing "determine native pixel format"?

If this needs to be changed, maybe an additional improvement: SDL_SetError() always returns -1. This helps saving vertical space in source. :)

And there are multiple line comments (//) which maybe cause problems with really old C compilers (but they make the changes in the patch more clear).
Comment 2 Sam Lantinga 2013-07-06 15:35:42 UTC
Implemented!
http://hg.libsdl.org/SDL/rev/b86947ea2749