TIGSource Forums

Developer => Technical => Topic started by: Glaiel-Gamer on June 09, 2009, 09:46:40 AM



Title: Gamepad Rumble?
Post by: Glaiel-Gamer on June 09, 2009, 09:46:40 AM
I'm using SDL for gamepad input, it works pretty well and was hassle free to set up (using an xbox360 controller on OSX as my test device)

A quick google told me that SDL has no support for rumble (wtf), and I would like to know, which libraries do I need to use for rumble on OSX and windows? I think I need to use directinput or something for windows, but I'm also extremely curious as to what to use for OSX, considering that's home base for me.


Title: Re: Gamepad Rumble?
Post by: Ryan on June 09, 2009, 10:09:54 AM
Perhaps the docs here (http://developer.apple.com/DOCUMENTATION/DeviceDrivers/Reference/ForceFeedback/ForceFeedback/index.html) will help you get started.

I'm not sure any force-feedback wrappers exist for OSX (although the docs mention the API is similar to DirectInput- which is a plus). Also, you'll need to make sure your driver for your controller supports force feedback as well.

Edit: 100th post! Looking back I registered Feb 20, 2007. I have the slowest post rate ever.  :beer:



Title: Re: Gamepad Rumble?
Post by: mjau on June 09, 2009, 01:32:17 PM
SDL 1.3 has rumble support.  Still in heavy development though, so you probably don't want to use it for anything serious just yet.  Thought I'd mention it though.


Title: Re: Gamepad Rumble?
Post by: Gravious on June 09, 2009, 03:29:15 PM
Hasn't SDL 1.3 been in development for years and years?

Hey, i can't talk, but I'm just saying...


Title: Re: Gamepad Rumble?
Post by: Glaiel-Gamer on June 10, 2009, 08:42:45 AM
Perhaps the docs here (http://developer.apple.com/DOCUMENTATION/DeviceDrivers/Reference/ForceFeedback/ForceFeedback/index.html) will help you get started.

Ugggg...

Is there any way to get the HIDDeviceIndex from the SDL_Joystick structure? or do I need to deal with the IOKit too and reconnect the device and jump through hoops to get this to work


Title: Re: Gamepad Rumble?
Post by: mjau on June 11, 2009, 02:44:58 AM
Hasn't SDL 1.3 been in development for years and years?

Yeah, about 2 years, I think?  It's a pretty hefty redesign though.  The small version number increment is a little misleading, it should probably be called SDL 2 in stead.

Is there any way to get the HIDDeviceIndex from the SDL_Joystick structure? or do I need to deal with the IOKit too and reconnect the device and jump through hoops to get this to work

I don't know, but you could always check out the source =). The SDL_Joystick struct isn't public though.