GLBasic forum

Main forum => GLBasic - en => Topic started by: MrPlow on 2015-Aug-04

Title: Logitech Gamepad with GameInput API
Post by: MrPlow on 2015-Aug-04
Hi

Has anyone got a Logitech working with the gameinput API

I would think Its very similar to xbox but I dont have a wired xbox controller to test with...

I am using with

Code (glbasic) Select


        // a game that support both small and big profiles can been controlled like this (here checking LEFT STICK and DPAD).
        L=GameInput.Left()+GameInput.LeftStick_Left();
        R=GameInput.Right()+GameInput.LeftStick_Right();
        U=GameInput.Up()+GameInput.LeftStick_Up();
        D=GameInput.Down()+GameInput.LeftStick_Down();

IF L>.6 THEN ....


Title: Re: Logitech Gamepad with GameInput API
Post by: spacefractal on 2015-Aug-04
What is the technical name of its? There is a GameInput.GetDeviceName$() (not home, but something like that). Then I'm can detect that name and map it to use xbox layout. It'd do the under GameInput.update().

Also don't forget do a GameInput.update() before polling.
Title: Re: Logitech Gamepad with GameInput API
Post by: MrPlow on 2015-Aug-04
It says it is called 'unknown'
Title: Re: Logitech Gamepad with GameInput API
Post by: spacefractal on 2015-Aug-04
What is its named when using GEYJOYNAME$() (if I'm remember the official command). I'm need the name or it. I'm still not home.
Title: Re: Logitech Gamepad with GameInput API
Post by: MrPlow on 2015-Aug-04
"Gamepad F310 (Controller)" when using GetJoyname$
Title: Re: Logitech Gamepad with GameInput API
Post by: spacefractal on 2015-Aug-04
Hopefully the layout is same as Xbox since im dont own that one. Mostly the triggers can mapped different. Im ADD that later today.

You do can still test it using keyboard until then.
Title: Re: Logitech Gamepad with GameInput API
Post by: spacefractal on 2015-Aug-04
checkout v1.3.2.

Im do no longer checking the controller name when polling in any of those commands, but can still been checked by GameInput.GetPlayerName$() (which was the correct function for checking original name).

Then im thinks its better to remap eventuelly problem controller directly if required.