1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-08-08 15:19:50 +00:00

Correctly distinguish between action sources when evaluating ActionMapper

I'm not quite happy with the hackishness of this change;
hope it doesn't incur too much runtime overhead with all these checks...
This commit is contained in:
fgenesis 2016-07-17 17:50:27 +02:00
parent 77e4bfd292
commit dcf09343b5
8 changed files with 113 additions and 7 deletions

View file

@ -35,7 +35,11 @@ typedef std::vector<int> ButtonList;
struct ActionData
{
ActionData() { id=-1; state=-1; source = -1; event=0; }
ActionData()
: id(-1), state(-1), source(-1)
, event(0)
{
}
int id, state, source;
Event *event;
@ -96,6 +100,7 @@ public:
bool pollAction(int actionID, int source);
bool getKeyState(int k);
bool getKeyState(int k, int sourceID);
ActionData *getActionDataByIDAndSource(int actionID, int source);
protected: