I put this here because took me too much time to find out a solution (if you can call it like that...), and maybe could be useful for someone else too.
When you have more than one Joystick/Gamepad connected to the PC them are always randomly switched, and you never know what will be the number...