"ssh:/git@developer.sourcefind.cn:2222/modelzoo/spark-x1.git" did not exist on "b33a94573656384fee4fa0a3eb3f5a9c8b7e7d53"
Commit 01314637 authored by Ben Hymers's avatar Ben Hymers
Browse files

Removed all trailing whitespace

parent b408932f
/* /*
The zlib/libpng License The zlib/libpng License
Copyright (c) 2007 Phillip Copyright (c) 2007 Phillip
This software is provided 'as-is', without any express or implied warranty. In no event will This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software. the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following applications, and to alter it and redistribute it freely, subject to the following
restrictions: restrictions:
1. The origin of this software must not be misrepresented; you must not claim that 1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product, you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is an acknowledgment in the product documentation would be appreciated but is
not required. not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef OIS_MacHIDManager_Header #ifndef OIS_MacHIDManager_Header
...@@ -61,7 +61,7 @@ namespace OIS ...@@ -61,7 +61,7 @@ namespace OIS
}; };
typedef std::vector<HidInfo*> HidInfoList; typedef std::vector<HidInfo*> HidInfoList;
class MacHIDManager : public FactoryCreator class MacHIDManager : public FactoryCreator
{ {
public: public:
...@@ -69,7 +69,7 @@ namespace OIS ...@@ -69,7 +69,7 @@ namespace OIS
~MacHIDManager(); ~MacHIDManager();
void initialize(); void initialize();
void iterateAndOpenDevices(io_iterator_t iterator); void iterateAndOpenDevices(io_iterator_t iterator);
io_iterator_t lookUpDevices(int usage, int page); io_iterator_t lookUpDevices(int usage, int page);
...@@ -97,7 +97,7 @@ namespace OIS ...@@ -97,7 +97,7 @@ namespace OIS
void parseDeviceProperties(CFDictionaryRef properties); void parseDeviceProperties(CFDictionaryRef properties);
void parseDevicePropertiesGroup(CFDictionaryRef properties); void parseDevicePropertiesGroup(CFDictionaryRef properties);
HidInfoList mDeviceList; HidInfoList mDeviceList;
}; };
} }
#endif #endif
/* /*
The zlib/libpng License The zlib/libpng License
Copyright (c) 2006 Chris Snyder Copyright (c) 2006 Chris Snyder
This software is provided 'as-is', without any express or implied warranty. In no event will This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software. the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following applications, and to alter it and redistribute it freely, subject to the following
restrictions: restrictions:
1. The origin of this software must not be misrepresented; you must not claim that 1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product, you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is an acknowledgment in the product documentation would be appreciated but is
not required. not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef OIS_MacHelpers_H #ifndef OIS_MacHelpers_H
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <Carbon/Carbon.h> #include <Carbon/Carbon.h>
// This is a hack needed to get the event handler working. // This is a hack needed to get the event handler working.
// The carbon lib expects a "OSStatus (*)(EventHandlerCallRef, EventRef, void*)", // The carbon lib expects a "OSStatus (*)(EventHandlerCallRef, EventRef, void*)",
// so I cannot give it a class member function (unless it is static which is pointless) // so I cannot give it a class member function (unless it is static which is pointless)
// Instead, I just pass the class* through the last paramter that gets passed to the // Instead, I just pass the class* through the last paramter that gets passed to the
...@@ -47,7 +47,7 @@ OSStatus MouseWrapper( EventHandlerCallRef nextHandler, EventRef theEvent, void* ...@@ -47,7 +47,7 @@ OSStatus MouseWrapper( EventHandlerCallRef nextHandler, EventRef theEvent, void*
// This is needed for keeping an event stack for keyboard and mouse // This is needed for keeping an event stack for keyboard and mouse
namespace OIS namespace OIS
{ {
// used in the eventStack to store the type // used in the eventStack to store the type
enum Mac_EventType { MAC_KEYUP = 0, enum Mac_EventType { MAC_KEYUP = 0,
MAC_KEYDOWN = 1, MAC_KEYDOWN = 1,
...@@ -57,37 +57,37 @@ namespace OIS ...@@ -57,37 +57,37 @@ namespace OIS
MAC_MOUSEMOVED, MAC_MOUSEMOVED,
MAC_MOUSESCROLL}; MAC_MOUSESCROLL};
typedef enum Mac_EventType MacEventType; typedef enum Mac_EventType MacEventType;
// only used by MacKeyboard // only used by MacKeyboard
typedef class Mac_KeyStackEvent typedef class Mac_KeyStackEvent
{ {
friend class MacKeyboard; friend class MacKeyboard;
private: private:
Mac_KeyStackEvent( KeyEvent event, MacEventType type ) : Event(event), Type(type) {} Mac_KeyStackEvent( KeyEvent event, MacEventType type ) : Event(event), Type(type) {}
MacEventType Type; MacEventType Type;
KeyEvent Event; KeyEvent Event;
} MacKeyStackEvent; } MacKeyStackEvent;
// only used by MacMouse // only used by MacMouse
typedef class Mac_MouseStackEvent typedef class Mac_MouseStackEvent
{ {
friend class MacMouse; friend class MacMouse;
private: private:
Mac_MouseStackEvent( MouseEvent event, MacEventType type, MouseButtonID button) : Event(event), Type(type), Button(button) {} Mac_MouseStackEvent( MouseEvent event, MacEventType type, MouseButtonID button) : Event(event), Type(type), Button(button) {}
MacEventType Type; MacEventType Type;
MouseEvent Event; MouseEvent Event;
MouseButtonID Button; MouseButtonID Button;
} MacMouseStackEvent; } MacMouseStackEvent;
} }
......
/* /*
The zlib/libpng License The zlib/libpng License
Copyright (c) 2006 Chris Snyder Copyright (c) 2006 Chris Snyder
This software is provided 'as-is', without any express or implied warranty. In no event will This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software. the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following applications, and to alter it and redistribute it freely, subject to the following
restrictions: restrictions:
1. The origin of this software must not be misrepresented; you must not claim that 1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product, you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is an acknowledgment in the product documentation would be appreciated but is
not required. not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef OIS_MacInputManager_H #ifndef OIS_MacInputManager_H
...@@ -30,13 +30,13 @@ ...@@ -30,13 +30,13 @@
namespace OIS namespace OIS
{ {
class MacInputManager : public InputManager, public FactoryCreator class MacInputManager : public InputManager, public FactoryCreator
{ {
public: public:
MacInputManager(); MacInputManager();
virtual ~MacInputManager(); virtual ~MacInputManager();
//InputManager Overrides //InputManager Overrides
/** @copydoc InputManager::_initialize */ /** @copydoc InputManager::_initialize */
void _initialize( ParamList &paramList ); void _initialize( ParamList &paramList );
...@@ -66,24 +66,24 @@ namespace OIS ...@@ -66,24 +66,24 @@ namespace OIS
//! Internal method, used for flaggin mouse as available/unavailable for creation //! Internal method, used for flaggin mouse as available/unavailable for creation
void _setMouseUsed(bool used) { mouseUsed = used; } void _setMouseUsed(bool used) { mouseUsed = used; }
//! methodfor getting the event target //! methodfor getting the event target
EventTargetRef _getEventTarget() {return mEventTargetRef;} EventTargetRef _getEventTarget() {return mEventTargetRef;}
//! method for getting window //! method for getting window
WindowRef _getWindow() {return mWindow;} WindowRef _getWindow() {return mWindow;}
protected: protected:
void _parseConfigSettings( ParamList& paramList ); void _parseConfigSettings( ParamList& paramList );
void _enumerateDevices(); void _enumerateDevices();
static const std::string iName; static const std::string iName;
// Mac stuff // Mac stuff
EventTargetRef mEventTargetRef; EventTargetRef mEventTargetRef;
WindowRef mWindow; WindowRef mWindow;
// settings // settings
bool mHideMouse; bool mHideMouse;
bool mUseRepeat; bool mUseRepeat;
...@@ -93,7 +93,7 @@ namespace OIS ...@@ -93,7 +93,7 @@ namespace OIS
//! Used to know if we used up mouse //! Used to know if we used up mouse
bool mouseUsed; bool mouseUsed;
//! HID Manager class handling devices other than keyboard/mouse //! HID Manager class handling devices other than keyboard/mouse
MacHIDManager *mHIDManager; MacHIDManager *mHIDManager;
}; };
......
/* /*
The zlib/libpng License The zlib/libpng License
Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com) Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software. the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following applications, and to alter it and redistribute it freely, subject to the following
restrictions: restrictions:
1. The origin of this software must not be misrepresented; you must not claim that 1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product, you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is an acknowledgment in the product documentation would be appreciated but is
not required. not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef MAC_Joystick_H #ifndef MAC_Joystick_H
...@@ -32,40 +32,40 @@ namespace OIS ...@@ -32,40 +32,40 @@ namespace OIS
{ {
int min; int min;
int max; int max;
AxisInfo(int min, int max) AxisInfo(int min, int max)
: min(min), max(max) {} : min(min), max(max) {}
}; };
typedef struct cookie_struct typedef struct cookie_struct
{ {
std::map<IOHIDElementCookie, AxisInfo> axisCookies; std::map<IOHIDElementCookie, AxisInfo> axisCookies;
std::vector<IOHIDElementCookie> buttonCookies; std::vector<IOHIDElementCookie> buttonCookies;
} cookie_struct_t; } cookie_struct_t;
//class HidDeviceInfo //class HidDeviceInfo
class MacJoyStick : public JoyStick class MacJoyStick : public JoyStick
{ {
public: public:
MacJoyStick(const std::string& vendor, bool buffered, HidInfo* info, InputManager* creator, int devID); MacJoyStick(const std::string& vendor, bool buffered, HidInfo* info, InputManager* creator, int devID);
virtual ~MacJoyStick(); virtual ~MacJoyStick();
/** @copydoc Object::setBuffered */ /** @copydoc Object::setBuffered */
virtual void setBuffered(bool buffered); virtual void setBuffered(bool buffered);
/** @copydoc Object::capture */ /** @copydoc Object::capture */
virtual void capture(); virtual void capture();
/** @copydoc Object::queryInterface */ /** @copydoc Object::queryInterface */
virtual Interface* queryInterface(Interface::IType type); virtual Interface* queryInterface(Interface::IType type);
/** @copydoc Object::_initialize */ /** @copydoc Object::_initialize */
virtual void _initialize(); virtual void _initialize();
void _enumerateCookies(); void _enumerateCookies();
IOHIDQueueInterface** _createQueue(unsigned int depth = 8); IOHIDQueueInterface** _createQueue(unsigned int depth = 8);
protected: protected:
HidInfo* mInfo; HidInfo* mInfo;
......
/* /*
The zlib/libpng License The zlib/libpng License
Copyright (c) 2006 Chris Snyder Copyright (c) 2006 Chris Snyder
This software is provided 'as-is', without any express or implied warranty. In no event will This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software. the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following applications, and to alter it and redistribute it freely, subject to the following
restrictions: restrictions:
1. The origin of this software must not be misrepresented; you must not claim that 1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product, you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is an acknowledgment in the product documentation would be appreciated but is
not required. not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef OIS_MacKeyboard_H #ifndef OIS_MacKeyboard_H
...@@ -31,72 +31,72 @@ ...@@ -31,72 +31,72 @@
namespace OIS namespace OIS
{ {
class MacKeyboard : public Keyboard class MacKeyboard : public Keyboard
{ {
public: public:
MacKeyboard( InputManager* creator, bool buffered, bool repeat ); MacKeyboard( InputManager* creator, bool buffered, bool repeat );
virtual ~MacKeyboard(); virtual ~MacKeyboard();
// Sets buffered mode // Sets buffered mode
virtual void setBuffered( bool buffered ); virtual void setBuffered( bool buffered );
// unbuffered keydown check // unbuffered keydown check
virtual bool isKeyDown( KeyCode key ) const; virtual bool isKeyDown( KeyCode key ) const;
// This will send listener events if buffered is on. // This will send listener events if buffered is on.
// Note that in the mac implementation, unbuffered input is // Note that in the mac implementation, unbuffered input is
// automatically updated without calling this. // automatically updated without calling this.
virtual void capture(); virtual void capture();
// Copies the current key buffer // Copies the current key buffer
virtual void copyKeyStates( char keys[256] ) const; virtual void copyKeyStates( char keys[256] ) const;
// Returns a description of the given key // Returns a description of the given key
virtual std::string& getAsString( KeyCode key ); virtual std::string& getAsString( KeyCode key );
virtual Interface* queryInterface( Interface::IType type ) { return 0; } virtual Interface* queryInterface( Interface::IType type ) { return 0; }
// Public but reserved for internal use: // Public but reserved for internal use:
virtual void _initialize(); virtual void _initialize();
void _keyDownCallback( EventRef theEvent ); void _keyDownCallback( EventRef theEvent );
void _keyUpCallback( EventRef theEvent ); void _keyUpCallback( EventRef theEvent );
void _modChangeCallback( EventRef theEvent ); void _modChangeCallback( EventRef theEvent );
protected: protected:
// just to get this out of the way // just to get this out of the way
void populateKeyConversion(); void populateKeyConversion();
// updates the keybuffer and optionally the eventStack // updates the keybuffer and optionally the eventStack
void injectEvent(KeyCode kc, unsigned int time, MacEventType type, unsigned int txt = 0 ); void injectEvent(KeyCode kc, unsigned int time, MacEventType type, unsigned int txt = 0 );
typedef std::map<UInt32, KeyCode> VirtualtoOIS_KeyMap; typedef std::map<UInt32, KeyCode> VirtualtoOIS_KeyMap;
VirtualtoOIS_KeyMap keyConversion; VirtualtoOIS_KeyMap keyConversion;
std::string getString; std::string getString;
char KeyBuffer[256]; char KeyBuffer[256];
UInt32 prevModMask; UInt32 prevModMask;
// "universal procedure pointers" - required reference for callbacks // "universal procedure pointers" - required reference for callbacks
EventHandlerUPP keyDownUPP; EventHandlerUPP keyDownUPP;
EventHandlerUPP keyUpUPP; EventHandlerUPP keyUpUPP;
EventHandlerUPP keyModUPP; EventHandlerUPP keyModUPP;
// so we can delete the handlers on destruction // so we can delete the handlers on destruction
EventHandlerRef keyDownEventRef; EventHandlerRef keyDownEventRef;
EventHandlerRef keyUpEventRef; EventHandlerRef keyUpEventRef;
EventHandlerRef keyModEventRef; EventHandlerRef keyModEventRef;
// buffered events, fifo stack // buffered events, fifo stack
typedef std::list<MacKeyStackEvent> eventStack; typedef std::list<MacKeyStackEvent> eventStack;
eventStack pendingEvents; eventStack pendingEvents;
bool useRepeat; bool useRepeat;
}; };
} }
#endif #endif
...@@ -14,7 +14,7 @@ namespace OIS ...@@ -14,7 +14,7 @@ namespace OIS
public: public:
MacMouse( InputManager* creator, bool buffered ); MacMouse( InputManager* creator, bool buffered );
virtual ~MacMouse(); virtual ~MacMouse();
/** @copydoc Object::setBuffered */ /** @copydoc Object::setBuffered */
virtual void setBuffered(bool buffered); virtual void setBuffered(bool buffered);
...@@ -26,23 +26,23 @@ namespace OIS ...@@ -26,23 +26,23 @@ namespace OIS
/** @copydoc Object::_initialize */ /** @copydoc Object::_initialize */
virtual void _initialize(); virtual void _initialize();
public: public:
void _mouseCallback( EventRef theEvent ); void _mouseCallback( EventRef theEvent );
protected: protected:
static OSStatus WindowFocusChanged(EventHandlerCallRef nextHandler, EventRef event, void* macMouse); static OSStatus WindowFocusChanged(EventHandlerCallRef nextHandler, EventRef event, void* macMouse);
// "universal procedure pointers" - required reference for callbacks // "universal procedure pointers" - required reference for callbacks
EventHandlerUPP mouseUPP; EventHandlerUPP mouseUPP;
EventHandlerRef mouseEventRef; EventHandlerRef mouseEventRef;
EventHandlerUPP mWindowFocusListener; EventHandlerUPP mWindowFocusListener;
EventHandlerRef mWindowFocusHandler; EventHandlerRef mWindowFocusHandler;
bool mNeedsToRegainFocus; bool mNeedsToRegainFocus;
bool mMouseWarped; bool mMouseWarped;
MouseState mTempState; MouseState mTempState;
}; };
} }
......
/* /*
The zlib/libpng License The zlib/libpng License
Copyright (c) 2006 Chris Snyder Copyright (c) 2006 Chris Snyder
This software is provided 'as-is', without any express or implied warranty. In no event will This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software. the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following applications, and to alter it and redistribute it freely, subject to the following
restrictions: restrictions:
1. The origin of this software must not be misrepresented; you must not claim that 1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product, you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is an acknowledgment in the product documentation would be appreciated but is
not required. not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
*/ */
#ifndef OIS_MacPrereqs_H #ifndef OIS_MacPrereqs_H
...@@ -34,7 +34,7 @@ namespace OIS ...@@ -34,7 +34,7 @@ namespace OIS
class MacMouse; class MacMouse;
class MacKeyboard; class MacKeyboard;
/** /**
Simple wrapper class for CFString which will create a valid CFString and retain ownership until class instance is outof scope Simple wrapper class for CFString which will create a valid CFString and retain ownership until class instance is outof scope
To Access the CFStringRef instance, simply cast to void*, pass into a function expecting a void* CFStringRef object, or access via cf_str() method To Access the CFStringRef instance, simply cast to void*, pass into a function expecting a void* CFStringRef object, or access via cf_str() method
*/ */
...@@ -49,7 +49,7 @@ namespace OIS ...@@ -49,7 +49,7 @@ namespace OIS
//Allow this class to be autoconverted to base class of StringRef (void*) //Allow this class to be autoconverted to base class of StringRef (void*)
operator void*() { return (void*)m_StringRef; } operator void*() { return (void*)m_StringRef; }
CFStringRef cf_str() { return m_StringRef; } CFStringRef cf_str() { return m_StringRef; }
private: private:
CFStringRef m_StringRef; CFStringRef m_StringRef;
}; };
......
...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com) ...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software. the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following applications, and to alter it and redistribute it freely, subject to the following
restrictions: restrictions:
1. The origin of this software must not be misrepresented; you must not claim that 1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product, you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is an acknowledgment in the product documentation would be appreciated but is
not required. not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
...@@ -47,7 +47,7 @@ namespace OIS ...@@ -47,7 +47,7 @@ namespace OIS
/** @copydoc ForceFeedback::setMasterGain */ /** @copydoc ForceFeedback::setMasterGain */
void setMasterGain( float level ); void setMasterGain( float level );
/** @copydoc ForceFeedback::setAutoCenterMode */ /** @copydoc ForceFeedback::setAutoCenterMode */
void setAutoCenterMode( bool auto_on ); void setAutoCenterMode( bool auto_on );
...@@ -82,7 +82,7 @@ namespace OIS ...@@ -82,7 +82,7 @@ namespace OIS
//Sets the common properties to all effects //Sets the common properties to all effects
void _setCommonProperties( DIEFFECT* diEffect, DWORD* rgdwAxes, void _setCommonProperties( DIEFFECT* diEffect, DWORD* rgdwAxes,
LONG* rglDirection, DIENVELOPE* diEnvelope, DWORD struct_size, LONG* rglDirection, DIENVELOPE* diEnvelope, DWORD struct_size,
LPVOID struct_type, const Effect* effect, const Envelope* envelope ); LPVOID struct_type, const Effect* effect, const Envelope* envelope );
//Actually do the upload //Actually do the upload
void _upload( GUID, DIEFFECT*, const Effect* ); void _upload( GUID, DIEFFECT*, const Effect* );
...@@ -97,7 +97,7 @@ namespace OIS ...@@ -97,7 +97,7 @@ namespace OIS
// Joystick device descriptor. // Joystick device descriptor.
IDirectInputDevice8* mJoyStick; IDirectInputDevice8* mJoyStick;
// Joystick capabilities. // Joystick capabilities.
const DIDEVCAPS* mpDIJoyCaps; const DIDEVCAPS* mpDIJoyCaps;
......
...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com) ...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software. the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following applications, and to alter it and redistribute it freely, subject to the following
restrictions: restrictions:
1. The origin of this software must not be misrepresented; you must not claim that 1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product, you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is an acknowledgment in the product documentation would be appreciated but is
not required. not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
...@@ -65,7 +65,7 @@ namespace OIS ...@@ -65,7 +65,7 @@ namespace OIS
//! Internal method, used for flaggin mouse as available/unavailable for creation //! Internal method, used for flaggin mouse as available/unavailable for creation
void _setMouseUsed(bool used) { mouseUsed = used; } void _setMouseUsed(bool used) { mouseUsed = used; }
//! Internal method, return unused joystick to queue //! Internal method, return unused joystick to queue
void _returnJoyStick(const JoyStickInfo& joystick); void _returnJoyStick(const JoyStickInfo& joystick);
...@@ -75,7 +75,7 @@ namespace OIS ...@@ -75,7 +75,7 @@ namespace OIS
protected: protected:
//! internal class method for dealing with param list //! internal class method for dealing with param list
void _parseConfigSettings( ParamList &paramList ); void _parseConfigSettings( ParamList &paramList );
//! internal class method for finding attached devices //! internal class method for finding attached devices
void _enumerateDevices(); void _enumerateDevices();
......
...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com) ...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software. the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following applications, and to alter it and redistribute it freely, subject to the following
restrictions: restrictions:
1. The origin of this software must not be misrepresented; you must not claim that 1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product, you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is an acknowledgment in the product documentation would be appreciated but is
not required. not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
...@@ -33,10 +33,10 @@ namespace OIS ...@@ -33,10 +33,10 @@ namespace OIS
public: public:
Win32JoyStick( InputManager* creator, IDirectInput8* pDI, bool buffered, DWORD coopSettings, const JoyStickInfo &info ); Win32JoyStick( InputManager* creator, IDirectInput8* pDI, bool buffered, DWORD coopSettings, const JoyStickInfo &info );
virtual ~Win32JoyStick(); virtual ~Win32JoyStick();
/** @copydoc Object::setBuffered */ /** @copydoc Object::setBuffered */
virtual void setBuffered(bool buffered); virtual void setBuffered(bool buffered);
/** @copydoc Object::capture */ /** @copydoc Object::capture */
virtual void capture(); virtual void capture();
...@@ -52,9 +52,9 @@ namespace OIS ...@@ -52,9 +52,9 @@ namespace OIS
#ifdef OIS_WIN32_XINPUT_SUPPORT #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
"IG_" (ex. "VID_045E&PID_028E&IG_00"). If it does, then it's an XInput device "IG_" (ex. "VID_045E&PID_028E&IG_00"). If it does, then it's an XInput device
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 #endif
......
...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com) ...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software. the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following applications, and to alter it and redistribute it freely, subject to the following
restrictions: restrictions:
1. The origin of this software must not be misrepresented; you must not claim that 1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product, you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is an acknowledgment in the product documentation would be appreciated but is
not required. not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
...@@ -46,7 +46,7 @@ namespace OIS ...@@ -46,7 +46,7 @@ namespace OIS
/** @copydoc Keyboard::isKeyDown */ /** @copydoc Keyboard::isKeyDown */
virtual bool isKeyDown(KeyCode key) const; virtual bool isKeyDown(KeyCode key) const;
/** @copydoc Keyboard::getAsString */ /** @copydoc Keyboard::getAsString */
virtual const std::string& getAsString(KeyCode kc); virtual const std::string& getAsString(KeyCode kc);
...@@ -55,13 +55,13 @@ namespace OIS ...@@ -55,13 +55,13 @@ namespace OIS
/** @copydoc Object::setBuffered */ /** @copydoc Object::setBuffered */
virtual void setBuffered(bool buffered); virtual void setBuffered(bool buffered);
/** @copydoc Object::capture */ /** @copydoc Object::capture */
virtual void capture(); virtual void capture();
/** @copydoc Object::queryInterface */ /** @copydoc Object::queryInterface */
virtual Interface* queryInterface(Interface::IType type) {return 0;} virtual Interface* queryInterface(Interface::IType type) {return 0;}
/** @copydoc Object::_initialize */ /** @copydoc Object::_initialize */
virtual void _initialize(); virtual void _initialize();
protected: protected:
...@@ -73,7 +73,7 @@ namespace OIS ...@@ -73,7 +73,7 @@ namespace OIS
DWORD coopSetting; DWORD coopSetting;
unsigned char KeyBuffer[256]; unsigned char KeyBuffer[256];
//! Internal method for translating KeyCodes to Text //! Internal method for translating KeyCodes to Text
int _translateText( KeyCode kc ); int _translateText( KeyCode kc );
......
...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com) ...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software. the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following applications, and to alter it and redistribute it freely, subject to the following
restrictions: restrictions:
1. The origin of this software must not be misrepresented; you must not claim that 1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product, you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is an acknowledgment in the product documentation would be appreciated but is
not required. not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
...@@ -33,7 +33,7 @@ namespace OIS ...@@ -33,7 +33,7 @@ namespace OIS
public: public:
Win32Mouse( InputManager* creator, IDirectInput8* pDI, bool buffered, DWORD coopSettings ); Win32Mouse( InputManager* creator, IDirectInput8* pDI, bool buffered, DWORD coopSettings );
virtual ~Win32Mouse(); virtual ~Win32Mouse();
/** @copydoc Object::setBuffered */ /** @copydoc Object::setBuffered */
virtual void setBuffered(bool buffered); virtual void setBuffered(bool buffered);
......
...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com) ...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software. the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following applications, and to alter it and redistribute it freely, subject to the following
restrictions: restrictions:
1. The origin of this software must not be misrepresented; you must not claim that 1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product, you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is an acknowledgment in the product documentation would be appreciated but is
not required. not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
......
...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com) ...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software. the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following applications, and to alter it and redistribute it freely, subject to the following
restrictions: restrictions:
1. The origin of this software must not be misrepresented; you must not claim that 1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product, you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is an acknowledgment in the product documentation would be appreciated but is
not required. not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
...@@ -25,17 +25,17 @@ restrictions: ...@@ -25,17 +25,17 @@ restrictions:
using namespace OIS; using namespace OIS;
//VC7.1 had a problem with these not getting included.. //VC7.1 had a problem with these not getting included..
//Perhaps a case of a crazy extreme optimizer :/ (moved to header) //Perhaps a case of a crazy extreme optimizer :/ (moved to header)
//const unsigned int Effect::OIS_INFINITE = 0xFFFFFFFF; //const unsigned int Effect::OIS_INFINITE = 0xFFFFFFFF;
//------------------------------------------------------------------------------// //------------------------------------------------------------------------------//
static const char* pszEForceString[] = static const char* pszEForceString[] =
{ "UnknownForce", { "UnknownForce",
"ConstantForce", "ConstantForce",
"RampForce", "RampForce",
"PeriodicForce", "PeriodicForce",
"ConditionalForce", "ConditionalForce",
"CustomForce" }; "CustomForce" };
const char* Effect::getForceTypeName(Effect::EForce eValue) const char* Effect::getForceTypeName(Effect::EForce eValue)
...@@ -43,7 +43,7 @@ const char* Effect::getForceTypeName(Effect::EForce eValue) ...@@ -43,7 +43,7 @@ const char* Effect::getForceTypeName(Effect::EForce eValue)
return (eValue >= 0 && eValue < _ForcesNumber) ? pszEForceString[eValue] : "<Bad force type>"; return (eValue >= 0 && eValue < _ForcesNumber) ? pszEForceString[eValue] : "<Bad force type>";
} }
static const char* pszETypeString[] = static const char* pszETypeString[] =
{ "Unknown", { "Unknown",
"Constant", "Constant",
"Ramp", "Ramp",
...@@ -56,7 +56,7 @@ const char* Effect::getEffectTypeName(Effect::EType eValue) ...@@ -56,7 +56,7 @@ const char* Effect::getEffectTypeName(Effect::EType eValue)
return (eValue >= 0 && eValue < _TypesNumber) ? pszETypeString[eValue] : "<Bad effect type>"; return (eValue >= 0 && eValue < _TypesNumber) ? pszETypeString[eValue] : "<Bad effect type>";
} }
static const char* pszEDirectionString[] = static const char* pszEDirectionString[] =
{ "NorthWest", "North", "NorthEast", "East", "SouthEast", "South", "SouthWest", "West"}; { "NorthWest", "North", "NorthEast", "East", "SouthEast", "South", "SouthWest", "West"};
const char* Effect::getDirectionName(Effect::EDirection eValue) const char* Effect::getDirectionName(Effect::EDirection eValue)
...@@ -65,10 +65,10 @@ const char* Effect::getDirectionName(Effect::EDirection eValue) ...@@ -65,10 +65,10 @@ const char* Effect::getDirectionName(Effect::EDirection eValue)
} }
//------------------------------------------------------------------------------// //------------------------------------------------------------------------------//
Effect::Effect(EForce ef, EType et) : Effect::Effect(EForce ef, EType et) :
force(ef), force(ef),
type(et), type(et),
direction(North), direction(North),
trigger_button(-1), trigger_button(-1),
trigger_interval(0), trigger_interval(0),
replay_length(Effect::OIS_INFINITE), replay_length(Effect::OIS_INFINITE),
......
...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com) ...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software. the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following applications, and to alter it and redistribute it freely, subject to the following
restrictions: restrictions:
1. The origin of this software must not be misrepresented; you must not claim that 1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product, you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is an acknowledgment in the product documentation would be appreciated but is
not required. not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
...@@ -61,7 +61,7 @@ const ForceFeedback::SupportedEffectList& ForceFeedback::getSupportedEffects() c ...@@ -61,7 +61,7 @@ const ForceFeedback::SupportedEffectList& ForceFeedback::getSupportedEffects() c
//-------------------------------------------------------------// //-------------------------------------------------------------//
bool ForceFeedback::supportsEffect(Effect::EForce force, Effect::EType type) const bool ForceFeedback::supportsEffect(Effect::EForce force, Effect::EType type) const
{ {
const std::pair<SupportedEffectList::const_iterator, SupportedEffectList::const_iterator> const std::pair<SupportedEffectList::const_iterator, SupportedEffectList::const_iterator>
iterRange = mSupportedEffects.equal_range(force); iterRange = mSupportedEffects.equal_range(force);
SupportedEffectList::const_iterator iter; SupportedEffectList::const_iterator iter;
for (iter = iterRange.first; iter != iterRange.second; iter++) for (iter = iterRange.first; iter != iterRange.second; iter++)
......
...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com) ...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software. the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following applications, and to alter it and redistribute it freely, subject to the following
restrictions: restrictions:
1. The origin of this software must not be misrepresented; you must not claim that 1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product, you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is an acknowledgment in the product documentation would be appreciated but is
not required. not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
...@@ -118,7 +118,7 @@ InputManager* InputManager::createInputSystem( ParamList &paramList ) ...@@ -118,7 +118,7 @@ InputManager* InputManager::createInputSystem( ParamList &paramList )
im = new iPhoneInputManager(); im = new iPhoneInputManager();
#else #else
OIS_EXCEPT(E_General, "No platform library.. check build platform defines!"); OIS_EXCEPT(E_General, "No platform library.. check build platform defines!");
#endif #endif
try try
{ {
...@@ -140,7 +140,7 @@ void InputManager::destroyInputSystem(InputManager* manager) ...@@ -140,7 +140,7 @@ void InputManager::destroyInputSystem(InputManager* manager)
return; return;
//Cleanup before deleting... //Cleanup before deleting...
for( FactoryCreatedObject::iterator i = manager->mFactoryObjects.begin(); for( FactoryCreatedObject::iterator i = manager->mFactoryObjects.begin();
i != manager->mFactoryObjects.end(); ++i ) i != manager->mFactoryObjects.end(); ++i )
{ {
i->second->destroyObject( i->first ); i->second->destroyObject( i->first );
......
...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com) ...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software. the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following applications, and to alter it and redistribute it freely, subject to the following
restrictions: restrictions:
1. The origin of this software must not be misrepresented; you must not claim that 1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product, you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is an acknowledgment in the product documentation would be appreciated but is
not required. not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
......
...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com) ...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software. the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following applications, and to alter it and redistribute it freely, subject to the following
restrictions: restrictions:
1. The origin of this software must not be misrepresented; you must not claim that 1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product, you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is an acknowledgment in the product documentation would be appreciated but is
not required. not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
...@@ -85,12 +85,12 @@ int SDLInputManager::numKeyboards() ...@@ -85,12 +85,12 @@ int SDLInputManager::numKeyboards()
Object* SDLInputManager::createInputObject( Type iType, bool bufferMode ) Object* SDLInputManager::createInputObject( Type iType, bool bufferMode )
{ {
Object* obj = 0; Object* obj = 0;
switch( iType ) switch( iType )
{ {
case OISKeyboard: obj = new SDLKeyboard( bufferMode ); break; case OISKeyboard: obj = new SDLKeyboard( bufferMode ); break;
case OISMouse: obj = new SDLMouse( bufferMode ); break; case OISMouse: obj = new SDLMouse( bufferMode ); break;
case OISJoyStick: case OISJoyStick:
default: OIS_EXCEPT( E_InputDeviceNotSupported, "Type not implemented"); default: OIS_EXCEPT( E_InputDeviceNotSupported, "Type not implemented");
} }
......
...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com) ...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software. the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following applications, and to alter it and redistribute it freely, subject to the following
restrictions: restrictions:
1. The origin of this software must not be misrepresented; you must not claim that 1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product, you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is an acknowledgment in the product documentation would be appreciated but is
not required. not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
...@@ -161,7 +161,7 @@ SDLKeyboard::~SDLKeyboard() ...@@ -161,7 +161,7 @@ SDLKeyboard::~SDLKeyboard()
void SDLKeyboard::capture() void SDLKeyboard::capture()
{ {
SDL_Event events[OIS_SDL_KEY_BUFF]; SDL_Event events[OIS_SDL_KEY_BUFF];
int count = SDL_PeepEvents(events, OIS_SDL_KEY_BUFF, SDL_GETEVENT, int count = SDL_PeepEvents(events, OIS_SDL_KEY_BUFF, SDL_GETEVENT,
SDL_EVENTMASK(SDL_KEYDOWN) | SDL_EVENTMASK(SDL_KEYUP)); SDL_EVENTMASK(SDL_KEYDOWN) | SDL_EVENTMASK(SDL_KEYUP));
for( int i = 0; i < count; ++i ) for( int i = 0; i < count; ++i )
......
...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com) ...@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software. the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following applications, and to alter it and redistribute it freely, subject to the following
restrictions: restrictions:
1. The origin of this software must not be misrepresented; you must not claim that 1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product, you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is an acknowledgment in the product documentation would be appreciated but is
not required. not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
...@@ -74,7 +74,7 @@ void SDLMouse::capture() ...@@ -74,7 +74,7 @@ void SDLMouse::capture()
{ {
switch( events[i].type ) switch( events[i].type )
{ {
case SDL_MOUSEMOTION: mouseXYMoved = true; break; case SDL_MOUSEMOTION: mouseXYMoved = true; break;
case SDL_MOUSEBUTTONDOWN: case SDL_MOUSEBUTTONDOWN:
{ {
mRegainFocus = true; mRegainFocus = true;
......
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