Move g_Joystick to SystemGlobals.cpp
authorKarlson2k <k2k@narod.ru>
Fri, 6 Jul 2012 16:35:11 +0000 (20:35 +0400)
committerKarlson2k <k2k@narod.ru>
Sun, 8 Jul 2012 20:35:52 +0000 (00:35 +0400)
xbmc/SystemGlobals.cpp
xbmc/input/SDLJoystick.cpp
xbmc/input/windows/WINJoystick.cpp

index 19a0d84..c6acf3a 100644 (file)
 #ifdef HAS_PYTHON
 #include "interfaces/python/XBPython.h"
 #endif
+#if defined(TARGET_WINDOWS)
+#include "input/windows/WINJoystick.h"
+#elif defined(HAS_SDL_JOYSTICK) || defined(HAS_EVENT_SERVER)
+#include "input/SDLJoystick.h"
+#endif
+
+
 
   CGUISettings       g_guiSettings;
   CSettings          g_settings;
@@ -57,6 +64,9 @@
   CGUITextureManager g_TextureManager;
   CGUILargeTextureManager g_largeTextureManager;
   CMouseStat         g_Mouse;
+#if defined(HAS_SDL_JOYSTICK) || defined(HAS_EVENT_SERVER)
+  CJoystick          g_Joystick; 
+#endif
   CGUIPassword       g_passwordManager;
   CGUIInfoManager    g_infoManager;
 
index 4eedbb8..df7fc8d 100644 (file)
@@ -32,8 +32,6 @@
 
 using namespace std;
 
-CJoystick g_Joystick; // global
-
 CJoystick::CJoystick()
 {
   Reset(true);
index e0a11f7..6194104 100644 (file)
@@ -31,8 +31,6 @@
 
 using namespace std;
 
-CJoystick g_Joystick; // global
-
 extern HWND g_hWnd;
 
 #define MAX_AXISAMOUNT  32768