DirectInput joystick code

I wrote some DX joystick code for SDL a while back. It’s been in use in
StepMania for some time. I havn’t had time to clean it up for inclusion,
particularly since the existing SDL code isn’t set up well for using
DirectX input devices outside of the video tree and I havn’t had the
urge to try to figure out how to do it right. However, the code’s been
sitting in SM for too long. So, I’ll attach it here in its current
state for whoever wants to use it, or clean it up for Sam (who expressed
interest in including it if it was polished up).

One issue is that it pulls in DInputCreate from the DX window code, and
assumes it’s loaded. You need to initialize video, and the driver that
was used must have been DX. (It’s OK if you use OpenGL, which doesn’t
actually use DDraw, since it still initializes the library.)

I don’t believe hats work; I don’t have anything to test them with.–
Glenn Maynard
-------------- next part --------------
A non-text attachment was scrubbed…
Name: SDL_dxjoystick.c
Type: text/x-csrc
Size: 14640 bytes
Desc: not available