According to the documentation, if a joystick is not connected joyGetPos will return JOYERR_UNPLUGGED. I have found that this is not the case in a Win98SE system. While with dinput I get always correct detection of the joystick, when I try to use (in the same program) joyGetPos with JOYSTICKID1, it always returns JOYERR_NOERROR, even if I unplug the only joystick and restart the PC. Game Controllers in Control Panel always reports correctly the presence or absence of the joystick. A subsequent try to call joySetCapture fails, but returns an undocumented error code (not MMSYSERR_NODRIVER, JOYERR_NOCANDO or JOYERR_UNPLUGGED). Does anyone know why is this happening ?

And something else: The JOYCAPS structure is not correctly defined in Windows.inc
Posted on 2002-04-09 06:04:19 by micmic