Always set VID/PID/name for connect tasks

This commit is contained in:
twinaphex 2017-01-02 07:47:38 +01:00
parent 824ba64daa
commit 03818dc780

View File

@ -182,12 +182,6 @@ static void input_autoconfigure_joypad_add(config_file_t *conf,
task_set_title(task, strdup(msg));
}
if (!string_is_empty(params->name))
strlcpy(settings->input.device_names[params->idx],
params->name,
sizeof(settings->input.device_names[params->idx]));
settings->input.pid[params->idx] = params->pid;
settings->input.vid[params->idx] = params->vid;
input_autoconfigure_joypad_reindex_devices(params);
}
@ -419,6 +413,13 @@ bool input_autoconfigure_connect(
state->pid = pid;
state->max_users = settings->input.max_users;
if (!string_is_empty(state->name))
strlcpy(settings->input.device_names[state->idx],
state->name,
sizeof(settings->input.device_names[state->idx]));
settings->input.pid[state->idx] = state->pid;
settings->input.vid[state->idx] = state->vid;
for (i = 0; i < RARCH_BIND_LIST_END; i++)
{