I have finished a code to read all functions of a Logitech F310 gamepad.
Then I am sharing the code:
'This code read all functions of a Logitech F310 gamepad. The back switch is on X position.
'Writed by ACJacques acj@infolink.com.br June/2020
x& = joyGetPosEx(0, Joy1.dwSize) 'using Windows DLL to get better resolution
PRINT USING "####";
(Joy1.dwXpos
/ 64) 'j esquerdo h left joystick horizontal all converted to 10 bits 1024 PRINT USING "####";
(Joy1.dwYpos
/ 64) 'j esquerdo v left joystick vertical PRINT USING "####";
(Joy1.dwUpos
/ 64) 'j direto h right joystick horizontal PRINT USING "####";
(Joy1.dwRpos
/ 64) 'j direito v right joystick vertical PRINT STRIG(1) 'botao A 'using native QB64 to get buttons