From a9c6d1da99732437d56b9ca964bb1b13b8d76887 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 9 Nov 2011 03:54:55 +0300 Subject: Add option to use joystick only if game window is active. --- src/joystick.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/joystick.h') 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 +#include +#include + 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. -- cgit v1.2.3-70-g09d2