DirectInput: use correct joypad id
DirectInput: use correct joypad id

Previously `joypad_count` was used as the index into the d_joypads array when initializing a new gamepad.
This caused the accidental override of an already connected device when a gamepad with a lower id was disconnected and connected again.

fixes #17566

Valentactive/godot,Faless/godot,pkowal1982/godot,sanikoyes/godot,Valentactive/godot,vnen/godot,guilhermefelipecgs/godot,akien-mga/godot,MarianoGnu/godot,MarianoGnu/godot,pkowal1982/godot,MarianoGnu/godot,guilhermefelipecgs/godot,sanikoyes/godot,Faless/godot,josempans/godot,pkowal1982/godot,akien-mga/godot,vkbsb/godot,BastiaanOlij/godot,Zylann/godot,firefly2442/godot,BastiaanOlij/godot,Shockblast/godot,BastiaanOlij/godot,akien-mga/godot,Zylann/godot,Zylann/godot,Valentactive/godot,vkbsb/godot,guilhermefelipecgs/godot,firefly2442/godot,josempans/godot,Zylann/godot,ZuBsPaCe/godot,godotengine/godot,Paulloz/godot,firefly2442/godot,sanikoyes/godot,Zylann/godot,guilhermefelipecgs/godot,vnen/godot,josempans/godot,josempans/godot,MarianoGnu/godot,pkowal1982/godot,Paulloz/godot,guilhermefelipecgs/godot,ZuBsPaCe/godot,vkbsb/godot,DmitriySalnikov/godot,honix/godot,BastiaanOlij/godot,firefly2442/godot,firefly2442/godot,DmitriySalnikov/godot,Faless/godot,Paulloz/godot,DmitriySalnikov/godot,Faless/godot,sanikoyes/godot,Paulloz/godot,vnen/godot,akien-mga/godot,Paulloz/godot,vkbsb/godot,Faless/godot,vnen/godot,Shockblast/godot,honix/godot,firefly2442/godot,honix/godot,akien-mga/godot,godotengine/godot,guilhermefelipecgs/godot,honix/godot,DmitriySalnikov/godot,vkbsb/godot,Shockblast/godot,vkbsb/godot,godotengine/godot,Faless/godot,godotengine/godot,Faless/godot,vnen/godot,honix/godot,Valentactive/godot,ZuBsPaCe/godot,DmitriySalnikov/godot,Valentactive/godot,akien-mga/godot,akien-mga/godot,BastiaanOlij/godot,vkbsb/godot,MarianoGnu/godot,pkowal1982/godot,sanikoyes/godot,pkowal1982/godot,vkbsb/godot,DmitriySalnikov/godot,BastiaanOlij/godot,josempans/godot,akien-mga/godot,ZuBsPaCe/godot,guilhermefelipecgs/godot,BastiaanOlij/godot,Paulloz/godot,guilhermefelipecgs/godot,ZuBsPaCe/godot,firefly2442/godot,Shockblast/godot,josempans/godot,Valentactive/godot,DmitriySalnikov/godot,sanikoyes/godot,ZuBsPaCe/godot,MarianoGnu/godot,Paulloz/godot,Faless/godot,firefly2442/godot,Shockblast/godot,vnen/godot,josempans/godot,sanikoyes/godot,vnen/godot,Valentactive/godot,MarianoGnu/godot,godotengine/godot,honix/godot,Valentactive/godot,Shockblast/godot,vnen/godot,ZuBsPaCe/godot,pkowal1982/godot,Zylann/godot,pkowal1982/godot,Zylann/godot,josempans/godot,godotengine/godot,MarianoGnu/godot,BastiaanOlij/godot,godotengine/godot,godotengine/godot,Shockblast/godot,Shockblast/godot,Zylann/godot,sanikoyes/godot,ZuBsPaCe/godot