X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b39dbf34b887a73c525da903d8599f4f6b7eb8f9..d2a931c9f745c69b8e9ccf72648b426fe064ff78:/src/msw/joystick.cpp diff --git a/src/msw/joystick.cpp b/src/msw/joystick.cpp index eb5ea63c87..78e023fd73 100644 --- a/src/msw/joystick.cpp +++ b/src/msw/joystick.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: joystick.cpp +// Name: src/msw/joystick.cpp // Purpose: wxJoystick class // Author: Julian Smart // Modified by: @@ -9,31 +9,26 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "joystick.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif -#include "wx/string.h" -#include "wx/window.h" -#include "wx/msw/private.h" +#if wxUSE_JOYSTICK -#if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__) - #include -#endif +#include "wx/joystick.h" -#if !defined(__WIN32__) && !defined(_MMRESULT_) -typedef UINT MMRESULT; +#ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/window.h" #endif -#ifdef __GNUWIN32_OLD__ -#include "wx/msw/gnuwin32/extra.h" +#include "wx/msw/private.h" + +#if !defined(__GNUWIN32_OLD__) || defined(__CYGWIN10__) + #include #endif // Why doesn't BC++ have joyGetPosEx? @@ -41,8 +36,9 @@ typedef UINT MMRESULT; #define NO_JOYGETPOSEX #endif -#include "wx/window.h" -#include "wx/msw/joystick.h" +#include "wx/msw/registry.h" + +#include IMPLEMENT_DYNAMIC_CLASS(wxJoystick, wxObject) @@ -50,35 +46,35 @@ IMPLEMENT_DYNAMIC_CLASS(wxJoystick, wxObject) //////////////////////////////////////////////////////////////////////////// /** - johan@linkdata.se 2002-08-20: - Now returns only valid, functioning - joysticks, counting from the first - available and upwards. + 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