summaryrefslogtreecommitdiff
path: root/src/joystick.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-09 03:54:55 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-09 03:58:39 +0300
commita9c6d1da99732437d56b9ca964bb1b13b8d76887 (patch)
tree0c5e8ed1bd721c50dd9e15c564287e131b071251 /src/joystick.h
parentffbd974deb426cdda39e1f0137a7fc4df681418d (diff)
downloadmanaverse-a9c6d1da99732437d56b9ca964bb1b13b8d76887.tar.gz
manaverse-a9c6d1da99732437d56b9ca964bb1b13b8d76887.tar.bz2
manaverse-a9c6d1da99732437d56b9ca964bb1b13b8d76887.tar.xz
manaverse-a9c6d1da99732437d56b9ca964bb1b13b8d76887.zip
Add option to use joystick only if game window is active.
Diffstat (limited to 'src/joystick.h')
-rw-r--r--src/joystick.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/joystick.h b/src/joystick.h
index 6a8a1a1b9..16f4b9bd3 100644
--- a/src/joystick.h
+++ b/src/joystick.h
@@ -25,6 +25,9 @@
#include <SDL.h>
+#include <string>
+#include <vector>
+
class Joystick
{
public:
@@ -109,6 +112,9 @@ class Joystick
int getNumber() const
{ return mNumber; }
+ void setUseInactive(bool b)
+ { mUseInactive = b; }
+
protected:
unsigned char mDirection;
bool mButtons[MAX_BUTTONS];
@@ -122,6 +128,7 @@ class Joystick
int mNumber;
bool mCalibrated;
int mButtonsNumber;
+ bool mUseInactive;
/**
* Is joystick support enabled.