Sign in to follow this  
ClementLuminy

PS3 Dualshock controller and DirectInput

Recommended Posts

ClementLuminy    121
Hello, Does anybody here already tried to use a DualShock 3 pad with DirectInput ? Is there any good tutorial available on the web that describe the right procedure to configure the DIDATAFORMAT used by DirectInput with a ps3 controller ? Any help, hints are welcome. Thanks for your help Clement

Share this post


Link to post
Share on other sites
ClementLuminy    121
Okay, i'm back after a few days of investigation.

Actually i'm able to find the PS3 controller as a DirectInput device, and to enumerate over all of it's objects...

The next step is to setup the right DIDATAFORMAT, which seam to be a quiet complicated task.

The DX SDK doc is really light when it come to use custom DIDATAFORMAT.
There is some articles over the web that talk about that, i will investigate them,
but if anybody already experienced such a problem and can share his experience, it could save me a lot of time.

Thanks a lot.


Clément

Share this post


Link to post
Share on other sites
CDTMD    100
I can use both analog sticks. Once you get one you already have access to the others information as well. Y is left up/down. X is left left/right. Z is right up/down. Zrot is right left/right.

I don't use a DIDATAFORMAT. Instead I have a DIJOYSTATE2.

Once I enumerate the objects and joysticks I then have access to the DIJOYSTATE2 data. I put the .lY, .lX, .lZ and .lRz in functions and that's it.

Once your done you could put in a dead zone to make it work better.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this