| Summary: | Joystick Initialisation | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Dave Hillier <davehillier81> |
| Component: | joystick | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P1 | ||
| Version: | 1.2.11 | ||
| Hardware: | x86 | ||
| OS: | Windows (XP) | ||
Everything that I've read indicates that the error code JOYERR_PARMS indicates a joystick not installed. I did notice a comment in MSDN that you should use joyGetPos() instead of joyGetPosEx() for simpler joysticks. If you replace that call with joyGetPos(), does it detect the joystick? Bumping some bugs' priorities to P1 for consideration before the 1.2.12 release (though some may not be resolved for 1.2.12). --ryan. I'm going to take a stab at this real quick. --ryan. BTW, I tested joyGetPos() and joyGetPosEx() and they were equivalent for the joysticks I have. Can you reproduce this bug?(In reply to comment #3) > I'm going to take a stab at this real quick. > > --ryan. > BTW, I tested joyGetPos() and joyGetPosEx() and they were equivalent for the joysticks I have. Can you reproduce this bug?
I just tried this with a NES controller rewired with a USB chip:
There are 1 joysticks attached
Joystick 0: SealieComputing RetroPad
axes: 2
balls: 0
hats: 0
buttons: 8
...msdn's text says that joyGetPos() is for devices with less than 3 axes, but apparently joyGetPosEx() still works with those.
I tried this on XP Service Pack 2. Perhaps the API is buggy in older OS releases?
Maybe this is just a driver issue on Dave's system? Dave, can you verify that this definitely broke between 1.2.8 and 1.2.11?
--ryan.
I think this must have been a driver bug, as I can't reproduce this anymore. Okay, thanks for checking, Dave. :) |
Joystick: Logitech Rumblepad 2 HID I've recently upgraded to version 1.2.11 from 1.2.8. Symptom: SDL_NumJoysticks() returns 0 despite a joystick being attached. Cause: E:\libs\SDL-1.2.11\src\joystick\win32\SDL_mmjoystick.c(170): result = joyGetPosEx(SYS_JoystickID[i], &joyinfo); returns JOYERR_PARMS As a work around I've changed line 171 to: if ( result != JOYERR_UNPLUGGED ) { I've no idea why this is happening, as the source seems to be relatively unchanged.