+/**
+ johan@linkdata.se 2002-08-20:
+ Now returns only valid, functioning
+ joysticks, counting from the first
+ available and upwards.
+*/
+wxJoystick::wxJoystick(int joystick)
+{
+ JOYINFO joyInfo;
+ int i, maxsticks;
+
+ maxsticks = joyGetNumDevs();
+ for( i=0; i<maxsticks; i++ )
+ {
+ if( joyGetPos(i, & joyInfo) == JOYERR_NOERROR )
+ {
+ if( !joystick )
+ {
+ /* Found the one we want, store actual OS id and return */
+ m_joystick = i;
+ return;
+ }
+ joystick --;
+ }
+ }
+
+ /* No such joystick, return ID 0 */
+ m_joystick = 0;
+ return;
+};
+
+wxPoint wxJoystick::GetPosition() const