Index: code/branches/kicklib/src/external/ois/CMakeLists.txt
===================================================================
--- code/branches/kicklib/src/external/ois/CMakeLists.txt	(revision 8071)
+++ code/branches/kicklib/src/external/ois/CMakeLists.txt	(revision 8073)
@@ -35,5 +35,5 @@
   OISPrereqs.h
 
-  #COMPILATION_BEGIN OISCompilation.cpp
+#COMPILATION_BEGIN OISCompilation.cpp
   OISEffect.cpp
   OISException.cpp
@@ -43,5 +43,5 @@
   OISKeyboard.cpp
   OISObject.cpp
-  #COMPILATION_END
+#COMPILATION_END
 )
 IF(WIN32)
@@ -53,4 +53,12 @@
 ENDIF()
 
+# Some unexplained hackery for Visual Studio 2005
+ADD_COMPILER_FLAGS("-D_WIN32_DCOM" MSVC8)
+
+# MinGW doesn't come with some required Windows headers
+IF(MINGW)
+  INCLUDE_DIRECTORIES(${WMI_INCLUDE_DIR})
+ENDIF()
+
 ORXONOX_ADD_LIBRARY(ois_orxonox
   ORXONOX_EXTERNAL
@@ -58,5 +66,5 @@
     "OIS_NONCLIENT_BUILD"
   VERSION
-    1.2
+    1.3
   SOURCE_FILES
     ${OIS_FILES}
@@ -64,5 +72,5 @@
 
 IF(WIN32)
-  TARGET_LINK_LIBRARIES(ois_orxonox ${DIRECTX_LIBRARIES})
+  TARGET_LINK_LIBRARIES(ois_orxonox ${DIRECTX_LIBRARIES} ${WMI_LIBRARY})
 ELSEIF(APPLE)
   TARGET_LINK_LIBRARIES(ois_orxonox "/System/Library/Frameworks/IOKit.framework" "/System/Library/Frameworks/Carbon.framework")
Index: code/branches/kicklib/src/external/ois/OISPrereqs.h
===================================================================
--- code/branches/kicklib/src/external/ois/OISPrereqs.h	(revision 8071)
+++ code/branches/kicklib/src/external/ois/OISPrereqs.h	(revision 8073)
@@ -101,7 +101,7 @@
 //-------------- Common Classes, Enums, and Typdef's -------------------------//
 #define OIS_VERSION_MAJOR 1
-#define OIS_VERSION_MINOR 4
+#define OIS_VERSION_MINOR 3
 #define OIS_VERSION_PATCH 0
-#define OIS_VERSION_NAME "1.4.0"
+#define OIS_VERSION_NAME "1.3.0"
 
 #define OIS_VERSION ((OIS_VERSION_MAJOR << 16) | (OIS_VERSION_MINOR << 8) | OIS_VERSION_PATCH)
Index: code/branches/kicklib/src/external/ois/VERSION
===================================================================
--- code/branches/kicklib/src/external/ois/VERSION	(revision 8071)
+++ code/branches/kicklib/src/external/ois/VERSION	(revision 8073)
@@ -1,2 +1,2 @@
-OIS SVN trunk updated on 2010/10/07 (revision 26)
-https://wgois.svn.sourceforge.net/svnroot/wgois/ois/trunk/
+OIS SVN v1.3 branch updated on 2011/02/20 (revision 32)
+https://wgois.svn.sourceforge.net/svnroot/wgois/ois/branches/v1-3/
Index: code/branches/kicklib/src/external/ois/changes_orxonox.diff
===================================================================
--- code/branches/kicklib/src/external/ois/changes_orxonox.diff	(revision 8071)
+++ code/branches/kicklib/src/external/ois/changes_orxonox.diff	(revision 8073)
@@ -49,4 +49,47 @@
 
 
+--- win32/Win32JoyStick.cpp
++++ win32/Win32JoyStick.cpp
+@@ -26,6 +26,14 @@
+ #include "OISEvents.h"
+ #include "OISException.h"
+ 
++// (Orxonox): Required for MinGW to compile properly
++#ifdef __MINGW32__
++#  include <oaidl.h>
++#  ifndef __MINGW_EXTENSION
++#    define __MINGW_EXTENSION __extension__
++#  endif
++#endif
++
+ #include <cassert>
+ #include <wbemidl.h>
+ #include <oleauto.h>
+@@ -39,6 +47,11 @@
+    }
+ #endif
+ 
++// (Orxonox): MinGW doesn't have swscanf_s
++#ifdef __MINGW32__
++#	define swscanf_s swscanf
++#endif
++
+ #ifdef OIS_WIN32_XINPUT_SUPPORT
+ #	pragma comment(lib, "xinput.lib")
+ #endif
+@@ -583,7 +596,12 @@
+     bool bCleanupCOM = SUCCEEDED(hr);
+ 
+     // Create WMI
++    // (Orxonox): Fix for MinGW
++#ifdef __MINGW32__
++    hr = CoCreateInstance(CLSID_WbemLocator, NULL, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID*)&pIWbemLocator);
++#else
+     hr = CoCreateInstance(__uuidof(WbemLocator), NULL, CLSCTX_INPROC_SERVER, __uuidof(IWbemLocator), (LPVOID*)&pIWbemLocator);
++#endif
+     if( FAILED(hr) || pIWbemLocator == NULL )
+         goto LCleanup;
+ 
+
 --- mac/MacHIDManager.cpp
 +++ mac/MacHIDManager.cpp
Index: code/branches/kicklib/src/external/ois/linux/LinuxKeyboard.cpp
===================================================================
--- code/branches/kicklib/src/external/ois/linux/LinuxKeyboard.cpp	(revision 8071)
+++ code/branches/kicklib/src/external/ois/linux/LinuxKeyboard.cpp	(revision 8073)
@@ -284,5 +284,7 @@
 	while( XPending(display) > 0 )
 	{
-		XNextEvent(display, &event); 		if(KeyPress == event.type)
+		XNextEvent(display, &event);
+
+		if(KeyPress == event.type)
 		{
 			unsigned int character = 0;
Index: code/branches/kicklib/src/external/ois/mac/CMakeLists.txt
===================================================================
--- code/branches/kicklib/src/external/ois/mac/CMakeLists.txt	(revision 8071)
+++ code/branches/kicklib/src/external/ois/mac/CMakeLists.txt	(revision 8073)
@@ -8,5 +8,5 @@
   MacPrereqs.h
 
-  #COMPILATION_BEGIN OISMacCompilation.cpp
+#COMPILATION_BEGIN OISMacCompilation.cpp
   MacHelpers.cpp
   MacHIDManager.cpp
@@ -15,4 +15,4 @@
   MacKeyboard.cpp
   MacMouse.cpp
-  #COMPILATION_END
+#COMPILATION_END
 )
Index: code/branches/kicklib/src/external/ois/win32/Win32JoyStick.cpp
===================================================================
--- code/branches/kicklib/src/external/ois/win32/Win32JoyStick.cpp	(revision 8071)
+++ code/branches/kicklib/src/external/ois/win32/Win32JoyStick.cpp	(revision 8073)
@@ -26,4 +26,12 @@
 #include "OISEvents.h"
 #include "OISException.h"
+
+// (Orxonox): Required for MinGW to compile properly
+#ifdef __MINGW32__
+#  include <oaidl.h>
+#  ifndef __MINGW_EXTENSION
+#    define __MINGW_EXTENSION __extension__
+#  endif
+#endif
 
 #include <cassert>
@@ -38,4 +46,9 @@
       x = NULL;         \
    }
+#endif
+
+// (Orxonox): MinGW doesn't have swscanf_s
+#ifdef __MINGW32__
+#	define swscanf_s swscanf
 #endif
 
@@ -584,5 +597,10 @@
 
     // Create WMI
+    // (Orxonox): Fix for MinGW
+#ifdef __MINGW32__
+    hr = CoCreateInstance(CLSID_WbemLocator, NULL, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID*)&pIWbemLocator);
+#else
     hr = CoCreateInstance(__uuidof(WbemLocator), NULL, CLSCTX_INPROC_SERVER, __uuidof(IWbemLocator), (LPVOID*)&pIWbemLocator);
+#endif
     if( FAILED(hr) || pIWbemLocator == NULL )
         goto LCleanup;
