ps3 controller in blender game

how can i use the ps3 controller in a blender game,i have tried both winsixaxis and ps3 exe.winsixaxis kept freezing and ps3 exe didnt work could anyone please help me(if possible could you post the blend file)
Edit: i solved the problem

It should work like a normal joystick provided that your OS picks it up. I’m not sure if this is the right place to ask how to set it up, but once you do you can just use the joystick sensor in the game logic tab which is pretty straight forward. You just need to figure out which button is which.
Good luck.