diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-11-09 03:54:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-11-09 03:58:39 +0300 |
commit | a9c6d1da99732437d56b9ca964bb1b13b8d76887 (patch) | |
tree | 0c5e8ed1bd721c50dd9e15c564287e131b071251 /src/joystick.h | |
parent | ffbd974deb426cdda39e1f0137a7fc4df681418d (diff) | |
download | manaplus-a9c6d1da99732437d56b9ca964bb1b13b8d76887.tar.gz manaplus-a9c6d1da99732437d56b9ca964bb1b13b8d76887.tar.bz2 manaplus-a9c6d1da99732437d56b9ca964bb1b13b8d76887.tar.xz manaplus-a9c6d1da99732437d56b9ca964bb1b13b8d76887.zip |
Add option to use joystick only if game window is active.
Diffstat (limited to 'src/joystick.h')
-rw-r--r-- | src/joystick.h | 7 |
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. |