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:
parent
77e4bfd292
commit
dcf09343b5
8 changed files with 113 additions and 7 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue