Retroarch retrolib pcsx rearmer modification

Hi everyone.

I have a problem with the libretro librairie in c++. I modify pcsx rearmed source code to emulate a multitap and play with 4 players on crash bash or crash team racing. i success modify the source code, when i launch the game i simulate the multitap and the game show me 4 players, the multitap is simulate bot only one keystate of once gamepad is send to the PSX core. With the work of Notaz, i success to see the keystate and gamepad value of 5 joypad plugged of a raspberry pi. But i will configure the multitap automatically, if we have 2 gamepad, every gamepad is set on each port. if more than 2 game pad is physically plugged on my raspberry pi i simulate a multitap. BUT, this is the BUT, i don’t know how to get the list of physical divide plugged on retroarch autoconfig gamepad. more than 2 a multitap and i construct the tram of multitap with port 1A, 1B, 1C, 1D.

If i check with

[FONT=arial]var.value = NULL;[/FONT] [FONT=arial]var.key = “pcsx_rearmed_pad1type”;[/FONT] [FONT=arial]if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) || var.value)

this code send me the code 4 (standard gamepad) on each port (1 to 8) but i have only 5 gamepad physically plugged. i can’t know how gamepad is really plugged…

if once of you can me help how to find the number of device plugged and configured on retroarch, this will be very helpful for me

PS : i’m french sorry for this bad english message…[/FONT]