enable the keyboard settings menu to handle multiple binds

This commit is contained in:
ac-stef
2016-08-26 14:31:58 +02:00
parent dbfdb5927b
commit ebd1c917dc
3 changed files with 58 additions and 26 deletions
+6 -3
View File
@@ -163,10 +163,13 @@ keym *findbind(const char *key)
return NULL;
}
keym *findbinda(const char *action, int type)
keym **findbinda(const char *action, int type)
{
loopv(keyms) if(!strcasecmp(keyms[i].actions[type], action)) return &keyms[i];
return NULL;
static vector<keym *> res;
res.setsize(0);
loopv(keyms) if(!strcasecmp(keyms[i].actions[type], action)) res.add(&keyms[i]);
res.add(NULL);
return res.getbuf();
}
keym *findbindc(int code)