- Timestamp:
- Apr 21, 2011, 6:58:23 PM (14 years ago)
- Location:
- code/branches/kicklib2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/kicklib2
- Property svn:mergeinfo changed
-
code/branches/kicklib2/src/external/ois/changes_orxonox.diff
r7163 r8284 10 10 //Ignorable Dll interface warning... 11 11 # if !defined(OIS_MINGW_COMPILER) 12 13 12 14 --- linux/EventHelpers.cpp (revision 5668) 13 15 +++ linux/EventHelpers.cpp (working copy) … … 37 39 +++ win32/Win32ForceFeedback.cpp 38 40 @@ -25,7 +25,7 @@ 39 #include < Math.h>41 #include <math.h> 40 42 41 43 // 0 = No trace; 1 = Important traces; 2 = Debug traces … … 45 47 #if (defined (_DEBUG) || defined(OIS_WIN32_JOYFF_DEBUG)) 46 48 #include <iostream> 49 50 51 --- win32/Win32JoyStick.cpp 52 +++ win32/Win32JoyStick.cpp 53 @@ -26,6 +26,14 @@ 54 #include "OISEvents.h" 55 #include "OISException.h" 56 57 +// (Orxonox): Required for MinGW to compile properly 58 +#ifdef __MINGW32__ 59 +# include <oaidl.h> 60 +# ifndef __MINGW_EXTENSION 61 +# define __MINGW_EXTENSION __extension__ 62 +# endif 63 +#endif 64 + 65 #include <cassert> 66 #include <wbemidl.h> 67 #include <oleauto.h> 68 @@ -39,6 +47,11 @@ 69 } 70 #endif 71 72 +// (Orxonox): MinGW doesn't have swscanf_s 73 +#ifdef __MINGW32__ 74 +# define swscanf_s swscanf 75 +#endif 76 + 77 #ifdef OIS_WIN32_XINPUT_SUPPORT 78 # pragma comment(lib, "xinput.lib") 79 #endif 80 @@ -583,7 +596,12 @@ 81 bool bCleanupCOM = SUCCEEDED(hr); 82 83 // Create WMI 84 + // (Orxonox): Fix for MinGW 85 +#ifdef __MINGW32__ 86 + hr = CoCreateInstance(CLSID_WbemLocator, NULL, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID*)&pIWbemLocator); 87 +#else 88 hr = CoCreateInstance(__uuidof(WbemLocator), NULL, CLSCTX_INPROC_SERVER, __uuidof(IWbemLocator), (LPVOID*)&pIWbemLocator); 89 +#endif 90 if( FAILED(hr) || pIWbemLocator == NULL ) 91 goto LCleanup; 92 93 94 --- mac/MacHIDManager.cpp 95 +++ mac/MacHIDManager.cpp 96 @@ -406,6 +406,7 @@ 97 switch(iType) 98 { 99 case OISJoyStick: 100 + { 101 int totalDevs = totalDevices(iType); 102 int freeDevs = freeDevices(iType); 103 int devID = totalDevs - freeDevs; 104 @@ -413,6 +414,7 @@ 105 obj = new MacJoyStick((*it)->combinedKey, bufferMode, *it, creator, devID); 106 (*it)->inUse = true; 107 return obj; 108 + } 109 case OISTablet: 110 //Create MacTablet 111 break;
Note: See TracChangeset
for help on using the changeset viewer.