use joystick name from mapping-db if available
This commit is contained in:
parent
e0a66b6e56
commit
82d06b0027
|
@ -173,6 +173,7 @@ void InputDefault::joy_connection_changed(int p_idx, bool p_connected, String p_
|
||||||
for (int i=0; i < map_db.size(); i++) {
|
for (int i=0; i < map_db.size(); i++) {
|
||||||
if (js.uid == map_db[i].uid) {
|
if (js.uid == map_db[i].uid) {
|
||||||
mapping = i;
|
mapping = i;
|
||||||
|
js.name = map_db[i].name;
|
||||||
//printf("found mapping\n");
|
//printf("found mapping\n");
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -826,6 +827,7 @@ void InputDefault::parse_mapping(String p_mapping) {
|
||||||
uid.resize(17);
|
uid.resize(17);
|
||||||
|
|
||||||
mapping.uid = entry[0];
|
mapping.uid = entry[0];
|
||||||
|
mapping.name = entry[1];
|
||||||
|
|
||||||
int idx = 1;
|
int idx = 1;
|
||||||
while (++idx < entry.size()) {
|
while (++idx < entry.size()) {
|
||||||
|
|
|
@ -102,6 +102,7 @@ private:
|
||||||
struct JoyDeviceMapping {
|
struct JoyDeviceMapping {
|
||||||
|
|
||||||
String uid;
|
String uid;
|
||||||
|
String name;
|
||||||
Map<int,JoyEvent> buttons;
|
Map<int,JoyEvent> buttons;
|
||||||
Map<int,JoyEvent> axis;
|
Map<int,JoyEvent> axis;
|
||||||
JoyEvent hat[HAT_MAX];
|
JoyEvent hat[HAT_MAX];
|
||||||
|
|
Loading…
Reference in New Issue