-
Notifications
You must be signed in to change notification settings - Fork 10
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
FFB not working on Midnight Club II (log included) #68
Comments
I'm not going to open another issue for this, but FFB is also not working in Ford Racing 2 for me- I uninstalled the FFB driver just in case of conflicts. Xidi is indeed retrieving FFB data according to this log. |
For Midnight Club II, I think this is a case of Xidi's existing implementation being slightly different than what DirectInput actually does. I see this in the log:
The result of trying to create an effect is always 0x80070057 (DIERR_INVALIDPARAM), meaning that Xidi looks at the parameters and rejects the effect as invalid. I believe the reason is under the "Axes" part of the parameters dump, where Xidi tries to identify the two axes but fails ("unable to identify"). Since the identification method is by object offset (DIEFF_OBJECTOFFSETS in the flags), that means that Xidi believes it doesn't know the offsets, which means as far as Xidi is concerned the application's data format (where the game defines all the offsets) isn't set. However, earlier in the log:
The difference is "interface object 2" for SetDataFormat vs "interface object 0" for CreateEffect, even though the associated virtual controller is the same. The way Xidi is currently implemented is it keeps all properties and state, including data format, local to each individual interface object. However, it may be the case that DirectInput shares one data format among all interface objects, in which case the fix to this issue is to change Xidi to do the same thing. I'll need to do some tests with DirectInput itself to figure out how it handles data formats in this instance. |
It turns out that DirectInput itself does exactly what Xidi does: keeps data formats local to individual objects. I wrote a test program that creates two interface objects for the same device, set the data format on one of them but not the other, and then called CreateEffect. If I call it on the interface object with the data format set, it succeeds, but if I call it on the other interface object, it fails. I'm not sure exactly how the game is getting away with creating effects successfully, but it is possible DirectInput itself provides a built-in workaround for this game. The FF driver would be able to take advantage of that (since it just plugs into DirectInput), and XInput Plus would be doing its own thing entirely. I don't think this is a bug in Xidi, but fixing the game's FF effects will require a workaround to be implemented. |
I can confirm it works (not well) in XInputPlus and it also works (decently) with that Japanese FFB driver/native dinput8. The game definitely supports it. I've been moving things over to Xidi where possible. I started the game up and did various things (hard driving, crashing into stuff at the end). I do see some effects in the log. The game does not appear to have a toggle for it.
Xidi_DInput8_mc2.exe_1600.log
The text was updated successfully, but these errors were encountered: