SFML community forums

Help => Window => Topic started by: herrerik on September 11, 2017, 02:17:46 pm

Title: Just need support for controller, is SFML right for me?
Post by: herrerik on September 11, 2017, 02:17:46 pm
Hi
Im using a game engine that utilizes directx 8.0 and as input I can use mouse and keyboard fine. But I need support for controllers, preferably for two controllers at the same time (with analog sticks as well such as the xbox 360 controller).

I already have graphics, sound and everything up and running, would SFML be easy to use with my existing game engine? I just need the controller support.

Thanks!
Erik
Title: Re: Just need support for controller, is SFML right for me?
Post by: eXpl0it3r on September 11, 2017, 02:20:24 pm
Since you looked your game down to Windows anyways with DirectX, why not go for XInput (https://msdn.microsoft.com/en-us/library/windows/desktop/ee417001(v=vs.85).aspx)?
Title: Re: Just need support for controller, is SFML right for me?
Post by: herrerik on September 11, 2017, 02:32:28 pm
That seem to be foused on the 360 controller specifically. I dont think it works with general windows-compatible controllers as well.
Title: Re: Just need support for controller, is SFML right for me?
Post by: FRex on September 22, 2017, 08:24:47 pm
For using a Dualshock 4 and making it pretend to be an XInput controller there is https://inputmapper.com/ and it's been working flawlessly for me. I can't comment about other kinds of controllers and multiple controllers though, I have just one myself. I also prefer a DS4 over XBone controller but the latter sadly seems to be the 'default' on Windows and it's assumed (by games like Final Fantasy, Zero Escape, Dark Souls, etc.) that you have a 360 or XBone or 'compatible' controller if you want to use controller in games on PC at all.