mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
add vid/pid to dinput
This commit is contained in:
parent
5d6ae90ab9
commit
c604b44672
@ -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(¶ms);
|
||||
RARCH_LOG("DINPUT %s %s %s\n",params.name, params.driver, params.display_name);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user