[Bug 9221] New: Force Feedback doesn't work but does after little source modification

Wine Bugs wine-bugs at winehq.org
Tue Aug 7 09:14:10 CDT 2007


http://bugs.winehq.org/show_bug.cgi?id=9221

           Summary: Force Feedback doesn't work but does after little source
                    modification
           Product: Wine
           Version: 0.9.42.
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: wine-directx-dinput
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: geraldf2 at free.fr


Hello,

I have a racing wheel game controller with force feedback, all working
on GNU/Linux. It does only Constant type force feedback (no Rumble or
Periodic effects, but that's ok since Constant force is the most
interesting type anyway).

With the games "Grand Prix Legends" and "LFS S2 Alpha (unlockable
demo)", and with Wine (0.9.42) as-is Force Feedback won't work.

However, after some very small modifications in Wine's dinput code, I
managed to get Force Feedback working well in both LFS and
GPLegends. See the attached patch but note it's quick/crude hack that
probably breaks some other games' FF (from now on I may use "FF" to
mean "Force Feedback").

I'm not competent enough to make a proper patch, that's why I
submit this as a bug report. As I said it's only quick/crude hacks,
that probably breaks some other game's FF. Also that makes Wine crash
on exit (I attached a modified-Wine's error output in case it's of any
interest, BUT NOTE that it is what happens ONLY WITH my little hack
(when you quit the game after some Force Feedback has been played and
Wine exit), so don't get confused because it's not the error output of
standard Wine. (I used 'WINEDEBUG=fixme-dinput' to avoid it being
flooded with fixme's as there are a lot of them repeating again and
again)).

I hope this info can be useful enough for Wine developers to attempt a
fix for these little problems, tough I imagine that it's not easy if
you don't have any force feedback capable device to test with. Anyway
if at one point one would like me to test a patch on my box you can
ask me. Also note that if you want to test "Grand Prix Legends" you
can download the "2004 demo" (
http://www.bhmotorsports.com/GPL/downloads/3239 ), as it's really in
fact the complete game but only including one track. For LFS, the
unlockable demo is here: http://www.lfs.net/?page=downloads .

Here's a brief description of what does the attached patch:

- Comment out a 'return DIERR_UNSUPPORTED;' that prevented FF to work
  in LFS.

- Add a 'DIDOI_FFACTUATOR' in some dwFlags (X and Y axis) because
  Grand Prix Legends wants to see that or else it wont attempt any FF
  stuff.

- Don't 'return DIERR_INCOMPLETEEFFECT;' if (peff->cAxes<1) in
  LinuxInputEffectImpl_SetParameters(...). That prevented FF to work
  in LFS.

- Comment out some envelope initialisation(?) stuff that made my wheel
  jerks very violently when FF plays (kinda like a pneumatic hammer).

- Add a 'This->effect.replay.delay = 0;' that makes FF in Grand Prix
  Legends work. I think the problem here may be related to the fact
  that Wine is setting this value with 'peff->dwStartDelay / 1000',
  but I did read somewhere (some msdn site) about dwStartDelay that
  "This member is not present in versions prior to DirectX 7.0.", and
  Grand Prix Legends is a 1998/1999 game that is, probably, DirectX 5,
  or at best 6. So dwStartDelay should probably not be used in this
  case, since the game doesn't even set it (?).

That's all. If you want me to try something or post some Wine trace
output tell me.

Thanks for reading.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list