# SDL Joystick support

**URL:** <https://discourse.libsdl.org/t/sdl-joystick-support/1667>\
**Category:** SDL Development\
**Created:** [January 29, 2000, 11:42am UTC](https://discourse.libsdl.org/t/sdl-joystick-support/1667 "2000-01-29T11:42:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [January 29, 2000, 11:42am UTC](https://discourse.libsdl.org/t/sdl-joystick-support/1667/1 "2000-01-29T11:42:34Z")

</div>

Hi, the SDL 1.1 development tree has support for joysticks.  
I am really interested in feedback on how well it works, so if you port  
the DGEN/SDL code to use it, please let me know. 🙂

If you are interested, check out the new header SDL\_joystick.h for the  
full API.

Thanks!  
-Sam Lantinga (slouken at [devolution.com](http://devolution.com))

Lead Programmer, Loki Entertainment Software–  
“Any sufficiently advanced bug is indistinguishable from a feature”  
– Rich Kulawiec

---

<div class="post-metadata">

**Author:** ![Bill\_Kendrick](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/b/df788c/32.png) [@Bill\_Kendrick](https://discourse.libsdl.org/u/Bill_Kendrick)\
**Post date:** [January 29, 2000, 8:33pm UTC](https://discourse.libsdl.org/t/sdl-joystick-support/1667/2 "2000-01-29T20:33:00Z")

</div>

> Hi, the SDL 1.1 development tree has support for joysticks.  
> I am really interested in feedback on how well it works, so if you port  
> the DGEN/SDL code to use it, please let me know. 🙂

I took out the Linux joystick code I had in Gem Drop X and replaced it  
with SDL code. Took a bit of figuring out how to do this (API’s were  
somewhat different, and I kept thinking that SDL’s joystick info. could  
ONLY be accessed as events… luckily I was wrong 🙂 ), but it seems to work  
fine.

(I also added the SDL keyrepeat code, since the original game used Xlib,  
which handled keyrepeat for me. The newer SDL version of Gem Drop X didn’t  
support keyrepeat until I linked it with SDL 1.1 🙂 )

'course, I’m using my code as though the stick were digital (in fact, the  
only joystick I have IS a digital-style stick - an NES-style game-pad),  
and only looking at one axis… So it’s not like I’m testing this too  
robustly. 🙂

-bill!
