X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c892a77ee4cdedb8270e24a17e1208b9e1c0fc47..bc55e31bdc7fbf6f1006f298ed8310e7972984e9:/src/msw/joystick.cpp diff --git a/src/msw/joystick.cpp b/src/msw/joystick.cpp index 1faaa0caf6..294447cb0a 100644 --- a/src/msw/joystick.cpp +++ b/src/msw/joystick.cpp @@ -1,18 +1,14 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: joystick.cpp +// Name: src/msw/joystick.cpp // Purpose: wxJoystick class // Author: Julian Smart // Modified by: // Created: 04/01/98 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "joystick.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -20,6 +16,9 @@ #pragma hdrstop #endif +#if wxUSE_JOYSTICK + +#include "wx/joystick.h" #include "wx/string.h" #include "wx/window.h" #include "wx/msw/private.h" @@ -28,23 +27,15 @@ #include #endif -#if !defined(__WIN32__) && !defined(_MMRESULT_) -typedef UINT MMRESULT; -#endif - -#ifndef __TWIN32__ -#ifdef __GNUWIN32_OLD__ -#include "wx/msw/gnuwin32/extra.h" -#endif -#endif - // Why doesn't BC++ have joyGetPosEx? -#if !defined(__WIN32__) || defined(__BORLANDC__) || defined(__TWIN32__) +#if !defined(__WIN32__) || defined(__BORLANDC__) #define NO_JOYGETPOSEX #endif #include "wx/window.h" -#include "wx/msw/joystick.h" +#include "wx/msw/registry.h" + +#include IMPLEMENT_DYNAMIC_CLASS(wxJoystick, wxObject) @@ -52,35 +43,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