Commit 7087bd0f authored by Kyle Rassweiler's avatar Kyle Rassweiler
Browse files

Merge branch 'master' of https://github.com/wgois/OIS

Conflicts:
	demos/OISConsole.cpp

Had pushed this fix to the wrong repo previously - KR
parents abd16784 692546bf
......@@ -99,6 +99,26 @@ restrictions:
# define OIS_ARCH_32
#endif
//-------------- Various helper preprocessor definitions ---------------------//
#ifdef OIS_MSVC_COMPILER
# define OIS_INLINE_PRAGMA(x) __pragma(x) // x is intentionally not wrapped; __pragma rejects expressions beginning with '('.
#else
# define OIS_INLINE_PRAGMA(x)
#endif
#define OIS_MACRO_BEGIN do {
#define OIS_MACRO_END \
} OIS_INLINE_PRAGMA(warning(push)) OIS_INLINE_PRAGMA(warning(disable:4127)) while (0) OIS_INLINE_PRAGMA(warning(pop))
// This creative trickery taken from this StackOverflow answer:
// http://stackoverflow.com/questions/4030959/will-a-variablename-c-statement-be-a-no-op-at-all-times/4030983#4030983
#define OIS_UNUSED(x)\
OIS_MACRO_BEGIN\
((void)(true ? 0 : ((x), void(), 0)));\
OIS_MACRO_END
//-------------- Common Classes, Enums, and Typdef's -------------------------//
#define OIS_VERSION_MAJOR 1
#define OIS_VERSION_MINOR 4
......@@ -167,7 +187,7 @@ namespace OIS
{
public:
Component() : cType(OIS_Unknown) {};
Component(ComponentType type) : cType(type) {};
explicit Component(ComponentType type) : cType(type) {};
//! Indicates what type of coponent this is
ComponentType cType;
};
......@@ -177,7 +197,7 @@ namespace OIS
{
public:
Button() : Component(OIS_Button), pushed(false) {}
Button(bool bPushed) : Component(OIS_Button), pushed(bPushed) {}
explicit Button(bool bPushed) : Component(OIS_Button), pushed(bPushed) {}
//! true if pushed, false otherwise
bool pushed;
};
......
......@@ -42,6 +42,9 @@ namespace OIS
/** @copydoc Keyboard::getAsString */
virtual const std::string& getAsString( KeyCode kc );
/** @copydoc Keyboard::getAsKeyCode */
virtual OIS::KeyCode getAsKeyCode( std::string str );
/** @copydoc Keyboard::copyKeyStates */
virtual void copyKeyStates( char keys[256] ) const;
......
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