mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 17:43:02 +00:00
(PSP) Just autodetect first pad
This commit is contained in:
parent
a670f3466c
commit
39d371bcbb
@ -24,25 +24,25 @@ static const char *psp_joypad_name(unsigned pad)
|
|||||||
return "PSP Controller";
|
return "PSP Controller";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void psp_joypad_autodetect_add(unsigned autoconf_pad)
|
||||||
|
{
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
|
autoconfig_params_t params = {{0}};
|
||||||
|
|
||||||
|
strlcpy(settings->input.device_names[autoconf_pad],
|
||||||
|
psp_joypad_name(autoconf_pad),
|
||||||
|
sizeof(settings->input.device_names[autoconf_pad]));
|
||||||
|
|
||||||
|
/* TODO - implement VID/PID? */
|
||||||
|
params.idx = autoconf_pad;
|
||||||
|
strlcpy(params.name, psp_joypad_name(autoconf_pad), sizeof(params.name));
|
||||||
|
strlcpy(params.driver, psp_joypad.ident, sizeof(params.driver));
|
||||||
|
input_config_autoconfigure_joypad(¶ms);
|
||||||
|
}
|
||||||
|
|
||||||
static bool psp_joypad_init(void)
|
static bool psp_joypad_init(void)
|
||||||
{
|
{
|
||||||
unsigned autoconf_pad;
|
psp_joypad_autodetect_add(0);
|
||||||
settings_t *settings = config_get_ptr();
|
|
||||||
|
|
||||||
for (autoconf_pad = 0; autoconf_pad < MAX_PADS; autoconf_pad++)
|
|
||||||
{
|
|
||||||
autoconfig_params_t params = {{0}};
|
|
||||||
|
|
||||||
strlcpy(settings->input.device_names[autoconf_pad],
|
|
||||||
psp_joypad_name(autoconf_pad),
|
|
||||||
sizeof(settings->input.device_names[autoconf_pad]));
|
|
||||||
|
|
||||||
/* TODO - implement VID/PID? */
|
|
||||||
params.idx = autoconf_pad;
|
|
||||||
strlcpy(params.name, psp_joypad_name(autoconf_pad), sizeof(params.name));
|
|
||||||
strlcpy(params.driver, psp_joypad.ident, sizeof(params.driver));
|
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user