diff --git a/include/wx/joystick.h b/include/wx/joystick.h index 370ee935c6..7203acb5bb 100644 --- a/include/wx/joystick.h +++ b/include/wx/joystick.h @@ -1,6 +1,8 @@ #ifndef _WX_JOYSTICK_H_BASE_ #define _WX_JOYSTICK_H_BASE_ +#if wxUSE_JOYSTICK + #if defined(__WXMSW__) #include "wx/msw/joystick.h" #elif defined(__WXMOTIF__) @@ -15,5 +17,7 @@ #include "wx/stubs/joystick.h" #endif +#endif // wxUSE_JOYSTICK + #endif // _WX_JOYSTICK_H_BASE_ diff --git a/src/gtk/joystick.cpp b/src/gtk/joystick.cpp index 9994f9a667..334fefee34 100644 --- a/src/gtk/joystick.cpp +++ b/src/gtk/joystick.cpp @@ -13,10 +13,12 @@ #pragma implementation "joystick.h" #endif -#include +#include "wx/defs.h" #if wxUSE_JOYSTICK +#include "wx/joystick.h" + #include #include #include diff --git a/src/gtk1/joystick.cpp b/src/gtk1/joystick.cpp index 9994f9a667..334fefee34 100644 --- a/src/gtk1/joystick.cpp +++ b/src/gtk1/joystick.cpp @@ -13,10 +13,12 @@ #pragma implementation "joystick.h" #endif -#include +#include "wx/defs.h" #if wxUSE_JOYSTICK +#include "wx/joystick.h" + #include #include #include