SFML community forums

Help => Window => Topic started by: smurf on November 20, 2023, 02:28:55 am

Title: Joystick doesn't work unless its connected before program starts
Post by: smurf on November 20, 2023, 02:28:55 am
If my joystick is connected and turned on when the game launches, everything seems ok. I can even turn it off, and turn it back on again, and it will keep working.

However if the controller is only turned on after the game has launched, it won't work. I see that the window.JoystickConnected event still fires when the controller comes on, HOWEVER, calling any of the query functions like Joystick.IsButtonPressed(i, 7) always returns false, and so does Joystick.IsConnected(i). Each frame I'm calling Joystick.Update().

How can I get SFML to notice the new controller? Like I said its already firing the JoystickConnected event, so IMO there should be no problem. But there is.

Title: Re: Joystick doesn't work unless its connected before program starts
Post by: eXpl0it3r on November 20, 2023, 08:35:40 am
Are you using SFML.Net?

We have three issues open regarding that and they aren't easily solvable.
Title: Re: Joystick doesn't work unless its connected before program starts
Post by: smurf on November 20, 2023, 03:34:06 pm
Yes I am!

Thanks I'll look at these links and see if it can help me (or if I can help out).