]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/joystick.cpp
patches for BC++ 5.3 from Ricky Gonzales <gonzales@pyramid3.net>
[wxWidgets.git] / src / msw / joystick.cpp
index 6f5dfcd0b556540c4c32908b6817928e8bfef95f..cd636fba81cc321dcfde821d03902a42976c4ed4 100644 (file)
 #pragma hdrstop
 #endif
 
-#include <windows.h>
+#include "wx/string.h"
+#include "wx/window.h"
+#include "wx/msw/private.h"
 
-#ifndef __GNUWIN32__
+#if !defined( __GNUWIN32__ ) || defined(wxUSE_NORLANDER_HEADERS)
 #include <mmsystem.h>
 #endif
 
 typedef UINT MMRESULT;
 #endif
 
+#ifndef __TWIN32__
 #ifdef __GNUWIN32__
-#include <wx/msw/gnuwin32/extra.h>
+#ifndef wxUSE_NORLANDER_HEADERS
+#include "wx/msw/gnuwin32/extra.h"
+#endif
+#endif
 #endif
 
 // Why doesn't BC++ have joyGetPosEx?
-#if !defined(__WIN32__) || defined(__BORLANDC__)
+#if !defined(__WIN32__) || defined(__BORLANDC__) || defined(__TWIN32__)
 #define NO_JOYGETPOSEX
 #endif
 
-#include <wx/window.h>
-#include <wx/msw/joystick.h>
+#include "wx/window.h"
+#include "wx/msw/joystick.h"
 
 IMPLEMENT_DYNAMIC_CLASS(wxJoystick, wxObject)
 
@@ -299,7 +305,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 +318,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 +331,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 +362,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 +375,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 +388,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 +401,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 +414,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 +427,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 +441,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 +454,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 +467,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 +480,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 +493,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 +506,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 +519,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;