diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-04-11 03:40:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-04-11 03:40:16 +0300 |
commit | dc53f8b7f360a489bd10355131339809d66378ef (patch) | |
tree | d97daa27aefe91866e8b64864c58236291f38b14 /src/joystick.h | |
parent | c810ee1fe7b42202a66935575a88264911f2c625 (diff) | |
download | ManaVerse-dc53f8b7f360a489bd10355131339809d66378ef.tar.gz ManaVerse-dc53f8b7f360a489bd10355131339809d66378ef.tar.bz2 ManaVerse-dc53f8b7f360a489bd10355131339809d66378ef.tar.xz ManaVerse-dc53f8b7f360a489bd10355131339809d66378ef.zip |
Add joystick validation before triggering events from it.
Diffstat (limited to 'src/joystick.h')
-rw-r--r-- | src/joystick.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/joystick.h b/src/joystick.h index 55b75d373..740fa7cbd 100644 --- a/src/joystick.h +++ b/src/joystick.h @@ -121,10 +121,12 @@ class Joystick KeysVector *getActionVector(const SDL_Event &event); - int getButtonFromEvent(const SDL_Event &event); + int getButtonFromEvent(const SDL_Event &event) const; bool isActionActive(int index) const; + bool validate() const; + protected: unsigned char mDirection; |