From aab80ddc8f56d6a383182ce5c241e9d94ca27bab Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 9 May 2012 21:16:31 +0300 Subject: Add ability to auto repeat some keys presses. --- src/joystick.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/joystick.h') diff --git a/src/joystick.h b/src/joystick.h index 39e96964f..f5495b83e 100644 --- a/src/joystick.h +++ b/src/joystick.h @@ -121,12 +121,18 @@ class Joystick KeysVector *getActionVector(const SDL_Event &event); + KeysVector *getActionVectorByKey(int i); + int getButtonFromEvent(const SDL_Event &event) const; bool isActionActive(int index) const; bool validate() const; + void handleRepeat(int time); + + void resetRepeat(int key); + protected: unsigned char mDirection; @@ -149,6 +155,8 @@ class Joystick KeyToIdMap mKeyToId; + KeyTimeMap mKeyTimeMap; + /** * Is joystick support enabled. */ -- cgit v1.2.3-60-g2f50