PS3 Sixaxis controller |
Ninjaboi
|
I've been trying to use a PS3 Sixaxis controller for joystick input, yet it seems that I can't get it to do more than recognize that a controller is plugged in. I've tested the controller in device properties and can move the axis and press the buttons without a problem while getting input. The problem is that my program doesn't seem to get the input. I tried Lazy Foo's sample tutorial code to see if it would work. It compiled perfectly, but it still didn't get the input. Here is the tutorial in case someone wants it:
http://lazyfoo.net/SDL_tutorials/lesson25/index.php The code is here:
I'm using SDL 1.2.14 on a Windows XP SP3 machine. My IDE is Visual Studio 2008 ( Non-Express Edition ). Again, no compiler errors or warnings, and the controller itself tests perfectly on games I play it with on the PC as well as testing it via device manager. |
|||||||||||||
|
PS3 Sixaxis controller |
Bl0ckeduser
Guest
|
Ninjaboi <dannymcgill <at> hotmail.com> writes:
in. I've tested the controller in device properties and can move the axis and press the buttons without a problem while getting input. The problem is that my program doesn't seem to get the input. I tried Lazy Foo's sample tutorial code to see if it would work. It compiled perfectly, but it still didn't get the input. Here is the tutorial in case someone wants it:http://lazyfoo.net/SDL_tutorials/lesson25/index.php According to the SDL docs, "Ideally joysticks should be read using the event system. To enable this, you must set the joystick event processing state with SDL_JoystickEventState." So, unless I'm mistaken, you probably want to add this line to your code: SDL_JoystickEventState(SDL_ENABLE); Bl0ckeduser _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
PS3 Sixaxis controller |
D B
Guest
|
Hi,
We recently added support for the PS3 controller in our little game bitfighter (bitfighter.org) One thing we noticed was that it behaved strangely under Linux. To solve this we implemented the old Linux device system just for it. See our source (with comments) at: https://code.google.com/p/bitfighter/source/browse/zap/Joystick.cpp#89 Maybe it will help a bit, D On Wed, Feb 15, 2012 at 11:05 PM, Ninjaboi wrote:
SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
riksweeney
|
Have you stuck in any debug to see if the motion event is being picked up?
I've never used the event.jaxis.which, I just assume there will only ever be 1 joystick plugged in |
|||||||||||||
|
Ninjaboi
|
Thanks for all the help, though I got it fixed. The problem wasn't the code or the controller per say, but that SDL wasn't able to treat the PS3 Sixaxis controller like a generic joystick. I got another PS3 controller ( not Sixaxis ) made by MadCatz and it worked perfectly as it should. So, it seems to me that only Sixaxis controllers have the issue ( as I tried two other Sixaxis controllers and they didn't work ). Not sure if this is a problem that has never been recognized until now, but that's what I'm getting out of this experience.
Thanks for the link to that source by the way, as it did help me think of a slightly different way to approach my event handling for the joystick. |
|||||||||||
|
RodrigoCard
|
Which OS are you using? You may get your SIXAXIS working by installing custom drivers.
I tested it right now with a DUALSHOCK3 (it have SIXAXIS written on it too =P) in OSX 10.7 and it works.
|
|||||||||||||
|
Ninjaboi
|
I'm running Windows XP SP3 using custom drivers for the SixAxis controllers. I also tried installing and using PPJoy to make Windows treat the controller like a generic joystick with no luck. I've also tried the application on Window Vista SP1 and Windows 7 SP1 with no luck until I used a joystick that wasn't SixAxis.
|
|||||||||||||
|