X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae090fdb7f4be47466b5728ad37065923b48c8c3..12335fa6aa8db0d0044ff4dbfa9ea056b57b0a66:/src/msw/joystick.cpp?ds=inline diff --git a/src/msw/joystick.cpp b/src/msw/joystick.cpp index b8920854e6..1cfed85842 100644 --- a/src/msw/joystick.cpp +++ b/src/msw/joystick.cpp @@ -51,6 +51,37 @@ IMPLEMENT_DYNAMIC_CLASS(wxJoystick, wxObject) // Attributes //////////////////////////////////////////////////////////////////////////// +/** + 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 0) || (res == JOYERR_NOERROR)); -} - -int wxJoystick::GetNumberJoysticks() const + int i, maxsticks, actualsticks; + maxsticks = joyGetNumDevs(); + actualsticks = 0; + for( i=0; i