EventThread: Track touch state (maximum 4 fingers)

This commit is contained in:
Jonas Kulla 2015-01-03 19:18:52 +01:00
parent 146e0294b4
commit 7003039e56
2 changed files with 55 additions and 16 deletions

View file

@ -40,11 +40,11 @@ struct RGSSThreadData;
typedef struct ALCdevice_struct ALCdevice;
struct SDL_Window;
#define MAX_FINGERS 4
class EventThread
{
public:
static uint8_t keyStates[SDL_NUM_SCANCODES];
struct JoyState
{
int axes[256];
@ -52,8 +52,6 @@ public:
bool buttons[256];
};
static JoyState joyState;
struct MouseState
{
int x, y;
@ -61,7 +59,21 @@ public:
bool buttons[32];
};
struct FingerState
{
bool down;
int x, y;
};
struct TouchState
{
FingerState fingers[MAX_FINGERS];
};
static uint8_t keyStates[SDL_NUM_SCANCODES];
static JoyState joyState;
static MouseState mouseState;
static TouchState touchState;
static bool allocUserEvents();