Commit b4398080 authored by Phillip Castaneda's avatar Phillip Castaneda
Browse files

Fixing latest gcc/mingw compile errors

parent 1607ee66
...@@ -49,6 +49,7 @@ namespace OIS ...@@ -49,6 +49,7 @@ namespace OIS
/** @copydoc Object::_initialize */ /** @copydoc Object::_initialize */
virtual void _initialize(); virtual void _initialize();
#ifdef OIS_WIN32_XINPUT_SUPPORT
/** /**
@remarks @remarks
Enum each PNP device using WMI and check each device ID to see if it contains Enum each PNP device using WMI and check each device ID to see if it contains
...@@ -56,6 +57,7 @@ namespace OIS ...@@ -56,6 +57,7 @@ namespace OIS
Unfortunately this information can not be found by just using DirectInput Unfortunately this information can not be found by just using DirectInput
*/ */
static void CheckXInputDevices(JoyStickInfoList &joys); static void CheckXInputDevices(JoyStickInfoList &joys);
#endif
protected: protected:
//! Enumerates all things //! Enumerates all things
......
...@@ -23,6 +23,7 @@ restrictions: ...@@ -23,6 +23,7 @@ restrictions:
#ifndef _WIN32_INPUTSYSTEM_PREREQS_H #ifndef _WIN32_INPUTSYSTEM_PREREQS_H
#define _WIN32_INPUTSYSTEM_PREREQS_H #define _WIN32_INPUTSYSTEM_PREREQS_H
#include <cstddef>
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#define DIRECTINPUT_VERSION 0x0800 #define DIRECTINPUT_VERSION 0x0800
#include <windows.h> #include <windows.h>
......
...@@ -27,6 +27,9 @@ restrictions: ...@@ -27,6 +27,9 @@ restrictions:
#include "OISException.h" #include "OISException.h"
#include <cassert> #include <cassert>
// Only if xinput support is enabled
#ifdef OIS_WIN32_XINPUT_SUPPORT
#include <wbemidl.h> #include <wbemidl.h>
#include <oleauto.h> #include <oleauto.h>
//#include <wmsstd.h> //#include <wmsstd.h>
...@@ -39,8 +42,7 @@ restrictions: ...@@ -39,8 +42,7 @@ restrictions:
} }
#endif #endif
#ifdef OIS_WIN32_XINPUT_SUPPORT #pragma comment(lib, "xinput.lib")
# pragma comment(lib, "xinput.lib")
#endif #endif
//DX Only defines macros for the JOYSTICK not JOYSTICK2, so fix it //DX Only defines macros for the JOYSTICK not JOYSTICK2, so fix it
...@@ -559,6 +561,7 @@ Interface* Win32JoyStick::queryInterface(Interface::IType type) ...@@ -559,6 +561,7 @@ Interface* Win32JoyStick::queryInterface(Interface::IType type)
} }
//--------------------------------------------------------------------------------------------------// //--------------------------------------------------------------------------------------------------//
#ifdef OIS_WIN32_XINPUT_SUPPORT
void Win32JoyStick::CheckXInputDevices(JoyStickInfoList &joys) void Win32JoyStick::CheckXInputDevices(JoyStickInfoList &joys)
{ {
IWbemLocator* pIWbemLocator = NULL; IWbemLocator* pIWbemLocator = NULL;
...@@ -682,3 +685,4 @@ LCleanup: ...@@ -682,3 +685,4 @@ LCleanup:
if(bCleanupCOM) if(bCleanupCOM)
CoUninitialize(); CoUninitialize();
} }
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment