(SOLVED) Controller needs to be plugged in before opening the game in order for it to work

So I just noticed something:

If you opened the game FIRST then plugged in your controller, it doesn’t work

BUT

If you plugged your controller FIRST then opened the game is works just fine

It’s not a big deal but why is that happening, it is a bug in the extension maybe?

My question would be, how to force the controller to work whether I plugged it first or not?

I don’t experience this issue. I just tested this on both the Not-a-Vania demo included in the engine and on my Itch page: Not-A-Vania Redux by Silver-Streak

I can leave the controller disconnected, and connect it after loading, and it works fine.

1 Like

@Silver-Streak
I just tested with your example and the same issue happens…

Did you test with the same steps as mentioned above?

Close and unplug everything for the first test…

First test (in my case it doesn’t work here):
1- Unplug your controller
2- Now open GDevelop and open the project
3- Open the preview
4- Plug the controller and test

Now again close and unplug everything for the second test…

Second test (It should work just find in this test) :
1- Plug your controller
2- Now open GDevelop and open the project
3- Open the preview
4- Test the controller

I’m using Xbox one controller plugged in using a USB cable

Waiting for your reply on this…

While the game running the API takes care of the new connections.
Technically the Gamepad extension retrieves data from the Gamepad API each time a condition or action is called.

I’m guessing it can be an old version of Chromium in browser/Electron?
I have the same controller and it works as Silver-Streak says with his example.

1 Like

Just to close the loop on this:

Yes, in all instances I started the examples entirely without the controller connected, and then connected the controller after reaching the title screen.

In all instances it worked as expected, and that is with both an Xbox and PS4 controller.

1 Like

@Silver-Streak @Bouh

OK thank god I just found the issue and it’s my Windows, I just tested on my laptop and everything is working great, even other testers told me that everything is working fine on their end too that’s why I had to look deeper into this >> my windows.

So basically what happened is that I remember that I did sometime ago (a year ago) a debloating of my Windows, removing all the unnecessary stuff and making the windows work as a bullet with 0% CPU usage on idle and below 10% usage on Ram usage.

This allowed me to work a lot faster and open heavier things, the windows is just super snappy in so many aspects and in gaming it’s super nice, but it has it’s issues like this one for example, sometimes while disabling things, something might go wrong or disable something else, which in this case I have no idea what could cause this, but it’s working with testers, with you and with my laptop so 100% it’s my issue not the game or GDevelop or the extension.

I’ll do another several tests in the next few days with the laptop before uploading the final Ver to stores.

Thank you so much as always for helping, you guys are awesome :fire: :raccoon:

4 Likes