add vid/pid to dinput

This commit is contained in:
radius 2015-07-09 20:39:43 -05:00
parent 5d6ae90ab9
commit c604b44672

View File

@ -177,6 +177,16 @@ static const char *dinput_joypad_name(unsigned pad)
return NULL;
}
static int32_t dinput_joypad_vid(unsigned pad)
{
return g_pads[pad].vid;
}
static int32_t dinput_joypad_pid(unsigned pad)
{
return g_pads[pad].pid;
}
static const char *dinput_joypad_friendly_name(unsigned pad)
{
if (pad < MAX_USERS)
@ -263,6 +273,8 @@ static BOOL CALLBACK enum_joypad_cb(const DIDEVICEINSTANCE *inst, void *p)
strlcpy(params.name, dinput_joypad_name(g_joypad_cnt), sizeof(params.name));
strlcpy(params.display_name, dinput_joypad_friendly_name(g_joypad_cnt), sizeof(params.driver));
strlcpy(params.driver, dinput_joypad.ident, sizeof(params.driver));
params.vid = dinput_joypad_vid(g_joypad_cnt);
params.pid = dinput_joypad_pid(g_joypad_cnt);
input_config_autoconfigure_joypad(&params);
RARCH_LOG("DINPUT %s %s %s\n",params.name, params.driver, params.display_name);
}