Skip to content
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

[BUG]: Wheel FFB not working on > v1.7.3727, Potential regression (and fix) found #11917

Closed
datapaganism opened this issue Oct 15, 2024 · 5 comments
Labels

Comments

@datapaganism
Copy link

Describe the Bug

I have been playing GT4 on PCSX2 after seeing a video on it but could not get any Force Feedback to work.
I am using an OpenFFBoard based wheel which is broadly compatible with many games without issue.

I did some hunting and I found that v1.7.3727 was the last version that the Force Feedback was functional, anything later (and especially 2.X) do not work at all.

I've dug around the code and I found a culprit (for my case at least)

Comparing the history of pcsx2/USB/usb-pad/usb-pad-sdl-ff.cpp

There was a change that broke the FFB support on my device (and based on other people's complaints I think on theirs too)

Any references to SDL_HAPTIC_CARTESIAN were replaced with SDL_HAPTIC_STEERING_AXIS.

Reverting SDL_HAPTIC_STEERING_AXIS to SDL_HAPTIC_CARTESIAN and compiling the latest version fixed all of my FFB problems.

Based on the lacking SDL documentation SDL_HAPTIC_STEERING_AXIS figures out the direction on its own but I don't actually see it doing anything (perhaps more needs to be done to get it to work)

However I have no idea if SDL_HAPTIC_STEERING_AXIS works on other people's hardware and reverting the change would be bad in that case.

I propose a tickbox on the USB Wheel settings page called Legacy Compatibility Mode that when enabled would init the FFBDevice to use SDL_HAPTIC_CARTESIAN instead of SDL_HAPTIC_STEERING_AXIS

Reproduction Steps

Compile the latest version git build with SDL_HAPTIC_STEERING_AXIS replaced with SDL_HAPTIC_CARTESIAN and launch GT4 in a race with a configured wheel and see if there is force feedback

Expected Behavior

No response

PCSX2 Revision

v2.0.2

Operating System

Windows 10 (64bit)

If Linux - Specify Distro

No response

Logs & Dumps

No response

@JordanTheToaster
Copy link
Member

Should work correctly on latest nightly plus #11915 once that is in.

@datapaganism
Copy link
Author

I will test this branch and let you know

@badfontkeming
Copy link
Contributor

I don't think my changes in #11915 will have an effect on this specific issue, but I also don't know that I'd call this PCSX2's fault specifically.

If SDL's SDL_HAPTIC_STEERING_AXIS isn't working correctly for your wheel, this implies that either your device is doing something weird, or there's an oversight in SDL itself. From a glance at the code, it seems like this could happen if your wheel reports more than one FFB axis.

It looks like OpenFFBoard supports scenarios with more than one FFB axis, so it's possible that this is the cause of your issue. I don't know whether your wheel is DIY'd or from a seller, but if you have the technical chops to investigate the first thing I'd do is check whether your device is reporting more than one FFB axis to the PC.

@datapaganism
Copy link
Author

I've tried #11915 and that hasn't done anything, but changing the direction type back to the cartesian seems to make it work again. I will ask the dev of openffboard to see if they know what could be the issue.

In the mean time I can just compile the latest source and change the direction myself

@badfontkeming
Copy link
Contributor

Sure thing, sounds good. Let me know if they have anything to say, they're free to reach out on this issue to help troubleshoot the root cause here.

Better to fix the need for a checkbox than to add one, after all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants