From dc53f8b7f360a489bd10355131339809d66378ef Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 11 Apr 2012 03:40:16 +0300 Subject: Add joystick validation before triggering events from it. --- src/joystick.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/joystick.h') 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; -- cgit v1.2.3-60-g2f50