by date
SDL Fix for Joysticks Under Linux
SDL Fix for Joysticks Under Linux
| Name: | Frank Carney | ![]() |
|---|---|---|
| Date Posted: | Mar 12, 2007 | |
| Rating: | Not Rated | |
| Public: | NO | |
| Comments: | YES | |
| RSS Feed: | or Subscribe with . | |
| Profile Page: | View profile page for Frank Carney |
Blog post
I am not sure if this is the place to post this, but I just got joystick stuff working for myself under Linux in TGE 1.5. It just did not want to produce usable output and I read up on the docs from SDL and they said you should be using events instead of polling. Okay, "I understand right answer when shown". So I went and tweaked the appropriate files and now I get events ONLY WHEN EVENTS ARE OCCURRING for the joystick events. Very nice!
Here is the link to the forum (sorry, only tge owners):
www.garagegames.com/mg/forums/result.thread.php?qt=59097
Please let me know if I need to adjust anything.
One thing I can think of is adding support for other events than those it currently processes for the joystick.
In the loop I only added support for four events:
SDL_JOYBUTTONDOWN
SDL_JOYBUTTONUP
SDL_JOYAXISMOTION
SDL_JOYHATMOTION
These are the same events as originally supported in the code. I just made them work with the SDL event processing methods rather than the one that was in there. It looks as though someone had intended to do this entirely in SDL, so I just ended up fixing it, hopefully.
Here is the link to the forum (sorry, only tge owners):
www.garagegames.com/mg/forums/result.thread.php?qt=59097
Please let me know if I need to adjust anything.
One thing I can think of is adding support for other events than those it currently processes for the joystick.
In the loop I only added support for four events:
SDL_JOYBUTTONDOWN
SDL_JOYBUTTONUP
SDL_JOYAXISMOTION
SDL_JOYHATMOTION
These are the same events as originally supported in the code. I just made them work with the SDL event processing methods rather than the one that was in there. It looks as though someone had intended to do this entirely in SDL, so I just ended up fixing it, hopefully.
Recent Blog Posts
| List: | 12/25/07 - Milestone Reached: Mission Launched from Database 12/24/07 - Creating Objects Without Creating Them 12/24/07 - Another Sqlite Blog 09/03/07 - SQLite is Fun! 08/20/07 - Playing House 07/05/07 - Getting burned out and coming back, again... 04/07/07 - Inputs, Inputs everywhere... 04/01/07 - RPG, what does it mean? |
|---|
Submit your own resources!You must be a member and be logged in to either append comments or rate this resource.



Not Rated


