Original Post
So I was going through my old stuff and found two PlayStation controllers. I thought It would be cool to use them in the game I'm developing as a self thing, I know other people don't have old PlayStation controllers but I do. So I bought a PlayStation to USB adapter and plugged it all in.
I'm using SlimDX's wrapper for DirectInput but only one port seems to work out of two that you can see from the image. It's really strange because DirectInput.GetDevices() returns a list of the available game pad devices and in that list is two devices which is exactly what I would expect. When I index the first device in the list sure enough I get the first port. However when I index the second device in the list I get the first port again. I don't know if this is a manufacturing problem or if it's with SlimDX. I do know it's not a problem with the controllers as they both work fine when plugged into the PlayStation.
So how come I always get the first port regardless of which object I pick from the DirectInput.GetDevices() list? I am completely stumped on why this would be happening and was hoping I could get some feed back on this issue.
Code:
EDIT:
The game runs in XNA and here's the download to it if you're interested of course you'll need the same adapter though.
http://www.fileswap.com/dl/AaP3FWolEk/
I'm using SlimDX's wrapper for DirectInput but only one port seems to work out of two that you can see from the image. It's really strange because DirectInput.GetDevices() returns a list of the available game pad devices and in that list is two devices which is exactly what I would expect. When I index the first device in the list sure enough I get the first port. However when I index the second device in the list I get the first port again. I don't know if this is a manufacturing problem or if it's with SlimDX. I do know it's not a problem with the controllers as they both work fine when plugged into the PlayStation.
So how come I always get the first port regardless of which object I pick from the DirectInput.GetDevices() list? I am completely stumped on why this would be happening and was hoping I could get some feed back on this issue.
Code:
int index = 1; //for some reason it always gets the first port.
DirectInput directInput = new DirectInput();
Guid controller = directInput.GetDevices(DeviceClass.GameController, DeviceEnumerationFlags.AllDevices)[index].ProductGuid;
gamePad = new Joystick(directInput, controller);
gamePad.SetCooperativeLevel(gameRef.Window.Handle, CooperativeLevel.Nonexclusive | CooperativeLevel.Background);
gamePad.Properties.AxisMode = DeviceAxisMode.Absolute;
gamePad.Properties.SetRange(-5000, 5000);
gamePad.Acquire();
EDIT:
The game runs in XNA and here's the download to it if you're interested of course you'll need the same adapter though.
http://www.fileswap.com/dl/AaP3FWolEk/