I’m making a game using C++ and SDL2, and for testing purposes I wanted my controller to rumble when detected by the program. However, said rumbling does not happen. I tried calling SDL_GameControllerRumble
in another part of my program to test it, and in that case it works until I unplug and plug back in my controller a few times.
SDL_GameControllerHasRumble always returns SDL_TRUE
.
I’ve tried doing some research and it appears compatibility is a huge topic when it comes to controllers in SDL2.
I am 100% sure the code reaches my function call, and I’m 100% sure the controller is connected when SDL_GameControllerRumble
is called.
The only difference i can think of is that when I call the function to test it, it’s in my main.cpp
file, while the first times I called it for the connection rumbling it was in a separate class implementation file, inputhandler.cpp
.
The function call is very basic: SDL_GameControllerRumble(controller, 0xFFFF / 2, 0xFFFF / 2, 250);
I am currently using a 8bitdo wired controller (not the Xbox licensed one) on Windows 11 (the controller works perfeclty and it’s pretty new), are there any compatibility issues with that? Is it an issue related with SDL2?