input: add vidpid as a clear text in unique mapping.
This commit is contained in:
10
input.cpp
10
input.cpp
@@ -1444,7 +1444,7 @@ static char *get_map_name(int dev, int def)
|
||||
static char name[128];
|
||||
char id[32];
|
||||
|
||||
if (cfg.controller_unique_mapping) sprintfz(id, "%08x", input[dev].unique_hash);
|
||||
if (cfg.controller_unique_mapping) sprintfz(id, "%s_%08x", input[dev].idstr, input[dev].unique_hash);
|
||||
else strcpyz(id, input[dev].idstr);
|
||||
|
||||
if (def || is_menu()) sprintf(name, "input_%s%s_v3.map", id, input[dev].mod ? "_m" : "");
|
||||
@@ -1456,7 +1456,7 @@ static char *get_kbdmap_name(int dev)
|
||||
{
|
||||
static char name[128];
|
||||
|
||||
if (cfg.controller_unique_mapping) sprintfz(name, "kbd_%08x.map", input[dev].unique_hash);
|
||||
if (cfg.controller_unique_mapping) sprintfz(name, "kbd_%s_%08x.map", input[dev].idstr, input[dev].unique_hash);
|
||||
else sprintfz(name, "kbd_%s.map", input[dev].idstr);
|
||||
|
||||
return name;
|
||||
@@ -3396,10 +3396,8 @@ void mergedevs()
|
||||
strcpy(input[i].sysfs, sysfs);
|
||||
strcpy(input[i].mac, uniq);
|
||||
|
||||
int unique_hash = str_hash(input[i].id);
|
||||
unique_hash = str_hash(input[i].mac, unique_hash);
|
||||
unique_hash = str_hash(input[i].idstr, unique_hash);
|
||||
input[i].unique_hash = unique_hash;
|
||||
input[i].unique_hash = str_hash(input[i].id);
|
||||
input[i].unique_hash = str_hash(input[i].mac, input[i].unique_hash);
|
||||
|
||||
input[i].timeout = (strlen(uniq) && strstr(sysfs, "bluetooth")) ? (cfg.bt_auto_disconnect * 10) : 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user