X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad5c34f309074eefe625b82e1203eec5b91247f5..1fd8a4504da7215d889e3e6234476581b0ba7adf:/src/msw/joystick.cpp diff --git a/src/msw/joystick.cpp b/src/msw/joystick.cpp index 6f5dfcd0b5..407e704130 100644 --- a/src/msw/joystick.cpp +++ b/src/msw/joystick.cpp @@ -20,7 +20,9 @@ #pragma hdrstop #endif -#include +#include "wx/string.h" +#include "wx/window.h" +#include "wx/msw/private.h" #ifndef __GNUWIN32__ #include @@ -30,12 +32,14 @@ typedef UINT MMRESULT; #endif +#ifndef __TWIN32__ #ifdef __GNUWIN32__ #include #endif +#endif // Why doesn't BC++ have joyGetPosEx? -#if !defined(__WIN32__) || defined(__BORLANDC__) +#if !defined(__WIN32__) || defined(__BORLANDC__) || defined(__TWIN32__) #define NO_JOYGETPOSEX #endif @@ -299,7 +303,7 @@ int wxJoystick::GetNumberButtons(void) const int wxJoystick::GetNumberAxes(void) const { -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__TWIN32__) JOYCAPS joyCaps; if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) return 0; @@ -312,7 +316,7 @@ int wxJoystick::GetNumberAxes(void) const int wxJoystick::GetMaxButtons(void) const { -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__TWIN32__) JOYCAPS joyCaps; if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) return 0; @@ -325,7 +329,7 @@ int wxJoystick::GetMaxButtons(void) const int wxJoystick::GetMaxAxes(void) const { -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__TWIN32__) JOYCAPS joyCaps; if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) return 0; @@ -356,7 +360,7 @@ int wxJoystick::GetPollingMax(void) const int wxJoystick::GetRudderMin(void) const { -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__TWIN32__) JOYCAPS joyCaps; if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) return 0; @@ -369,7 +373,7 @@ int wxJoystick::GetRudderMin(void) const int wxJoystick::GetRudderMax(void) const { -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__TWIN32__) JOYCAPS joyCaps; if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) return 0; @@ -382,7 +386,7 @@ int wxJoystick::GetRudderMax(void) const int wxJoystick::GetUMin(void) const { -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__TWIN32__) JOYCAPS joyCaps; if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) return 0; @@ -395,7 +399,7 @@ int wxJoystick::GetUMin(void) const int wxJoystick::GetUMax(void) const { -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__TWIN32__) JOYCAPS joyCaps; if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) return 0; @@ -408,7 +412,7 @@ int wxJoystick::GetUMax(void) const int wxJoystick::GetVMin(void) const { -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__TWIN32__) JOYCAPS joyCaps; if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) return 0; @@ -421,7 +425,7 @@ int wxJoystick::GetVMin(void) const int wxJoystick::GetVMax(void) const { -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__TWIN32__) JOYCAPS joyCaps; if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) return 0; @@ -435,7 +439,7 @@ int wxJoystick::GetVMax(void) const bool wxJoystick::HasRudder(void) const { -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__TWIN32__) JOYCAPS joyCaps; if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) return FALSE; @@ -448,7 +452,7 @@ bool wxJoystick::HasRudder(void) const bool wxJoystick::HasZ(void) const { -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__TWIN32__) JOYCAPS joyCaps; if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) return FALSE; @@ -461,7 +465,7 @@ bool wxJoystick::HasZ(void) const bool wxJoystick::HasU(void) const { -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__TWIN32__) JOYCAPS joyCaps; if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) return FALSE; @@ -474,7 +478,7 @@ bool wxJoystick::HasU(void) const bool wxJoystick::HasV(void) const { -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__TWIN32__) JOYCAPS joyCaps; if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) return FALSE; @@ -487,7 +491,7 @@ bool wxJoystick::HasV(void) const bool wxJoystick::HasPOV(void) const { -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__TWIN32__) JOYCAPS joyCaps; if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) return FALSE; @@ -500,7 +504,7 @@ bool wxJoystick::HasPOV(void) const bool wxJoystick::HasPOV4Dir(void) const { -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__TWIN32__) JOYCAPS joyCaps; if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) return FALSE; @@ -513,7 +517,7 @@ bool wxJoystick::HasPOV4Dir(void) const bool wxJoystick::HasPOVCTS(void) const { -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__TWIN32__) JOYCAPS joyCaps; if (joyGetDevCaps(m_joystick, & joyCaps, sizeof(JOYCAPS)) != JOYERR_NOERROR) return FALSE;