-
-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rumble on Xbox 360 controller only works after a button press #802
Comments
I don't think so May be you could test by
And see if your controller can vibrate during the crash if yes, then plug in the steering wheels also and try loading the state again |
Flycast doesn't need a button press to recognize a gamepad or to make it rumble. I just double checked by playing a game with the keyboard and the PS3 gamepad on my desk started rumbling. |
Could this be related to XInput controllers? I tested several times with Crazy Tax and Crazy Taxi 2:
I wonder if this is some SDL behavior when used with XInput controllers. That said, I tested PCSX2 that also uses SDL, and it could vibrate a motor from XInput controller without needing any buttons to be pressed. Not sure if the SDL versions are the same between the 2 emulators though. This behaviors happens very consistently for me in Flycast. Do you have an XInput controller to try? |
Both PCSX2 & Duckstation are using the higher level There could be some extra handling / initialisation when using |
I just tried on Windows and yes, I have to press a button for the rumble to start working. I tried with a Xbox Series X controller and a PS3 gamepad with the same result. The same PS3 controller doesn't need a button press for the rumble to start working on linux so I assume this is a Windows / XInput thing. |
Thank you both for looking into this. Searching in SDL github and found some threads with some suggestion / hint. It seems there is a “correlation” process that is known. Having to press a button to correlate is a blocker for my setup though, so hope there is a viable workaround. Not familiar with the code base. Is there something applicable there? |
The latter issue seems related. Apparently SDL is now using the raw input API on windows, and it needs to correlate rumble devices with input devices. This explains why rumble isn't active until after a button is pressed on the corresponding gamepad. I was able to make a gamepad rumble without interaction by disabling the raw input api in SDL with this environment variable:
|
Interesting, looks like they need to use this correlation to support more than 4 XInput controllers |
The SDL_JOYSTICK_RAWINPUT environment variable gave me a viable workaround, thank you. Something to consider opt-out the default behavior since it seems unlikely Flycast would need more than 4 controllers. But I am happy to find a resolution for my issue. Thanks again. |
Seeing this on Windows Standalone. Here is my setup - I have a driving cabinet powered by a Windows PC, the wheels and pedals are connected through an USB interface that present them as an USB HID gamepad, no rumble. There is a separate Xbox 360 controller connected via USB that drives the rumble motor.
In Flycast, I can see both controllers but the rumble (via Xbox 360 controller) would only work if I press some other buttons on it first. In my actual setup, the Xbox 360 controller is not accessible, so that would not be possible. The same setup works in other emulators using SDL (PCSX2, Duckstation, etc.) without having to press a button first for rumble to start working, so I don't think it's an inherently an SDL issue.
Does Flycast has any additional logic to "filter" controllers until a button is pressed? Is there a way to modify or suppress this behavior?
For reference, how the 2 controllers show up in Settings UI:
The text was updated successfully, but these errors were encountered: