Results 1 to 2 of 2

Thread: Joystick Support Not Working in WINE

  1. #1

    Default Joystick Support Not Working in WINE

    Well, I tried both #winehq and thought i had the fix, as well as traveled to hell and back on google. So I'm hoping someone here will know what to do.

    The problem is that WINE does not properly recognize my Gamepad (or joystick if you may). I am running WINE 0.9.44 and Gentoo 2007.0 and the gamepad is a Logitech Cordless RumblePad 2. I am primarily trying to get it to work with FlatOut 2, but I have also tried it with the Win32 ver of ZSNES and it doesn't work there either which leads me to believe It's a DInput problem.

    When I start WINE with, "WINEDEBUG=+dinput wine ./flatout2.exe, here is the output from the terminal:

    firedemonsic@VENOM ~/.wine/drive_c/Program Files/FlatOut 2 $ WINEDEBUG=+dinput wine ./flatout2.exe
    *A BUNCH OF USELESS MESSAGES ABOUT OSS*
    trace:dinputirectInput8Create hInst (0x400000), dwVersion: 2048, riid ({bf798030-483a-4da2-aa99-5d64ed369700}), punkOuter ((nil)))
    errle:CoInitializeEx Attempt to change threading model of this apartment from multi-threaded to apartment threaded
    trace:dinputllGetClassObject ({25e609e4-b259-11cf-bfc7-444553540000},{00000001-0000-0000-c000-000000000046},0x173fce8)
    trace:dinputI8CF_CreateInstance (0x7c84791c)->((nil),{bf798030-483a-4da2-aa99-5d64ed369700},0x801d54)
    trace:dinputirectInputCreateEx ((nil),0800,{bf798030-483a-4da2-aa99-5d64ed369700},0x801d54,(nil))
    trace:dinput:check_hook_thread IDirectInputs left: 1
    trace:dinput:IDirectInputAImpl_QueryInterface (0x39e3a90)->({bf798030-483a-4da2-aa99-5d64ed369700},0x801d54)
    trace:dinput:IDirectInputAImpl_AddRef (0x39e3a90) incrementing from 0
    trace:dinput:IDirectInputAImpl_Initialize (this=0x39e3a90,0x400000,800)
    trace:dinput:IDirectInputAImpl_EnumDevices (this=0x39e3a90,0x0004 'DIDEVTYPE_JOYSTICK',0x598490,0x1f6efbc,0001)
    trace:dinput:IDirectInputAImpl_EnumDevices flags:
    trace:dinput:IDirectInputAImpl_EnumDevices - checking device 0 ('Wine mouse driver')
    trace:dinput:IDirectInputAImpl_EnumDevices - checking device 1 ('Wine keyboard driver')
    trace:dinput:IDirectInputAImpl_EnumDevices - checking device 2 ('Wine Linux-input joystick driver')
    trace:dinput:IDirectInputAImpl_EnumDevices - checking device 3 ('Wine Linux joystick driver')
    trace:dinput:joydev_enum_deviceA Enumerating the linux Joystick device: /dev/input/js0 (Logitech Logitech Cordless RumblePad 2)
    trace:dinput:IDirectInput7AImpl_CreateDeviceEx (0x39e3a90)->({9e573ed9-7734-0000-8d4a-23903fb6bdf7}, (null), 0x801850, (nil))
    warn:dinput:joydev_create_deviceA invalid device GUID
    warn:dinput:joydev_create_deviceA invalid device GUID
    trace:dinput:IDirectInputAImpl_EnumDevices - checking device 3 ('Wine Linux joystick driver')
    trace:dinput:IDirectInputAImpl_Release (0x39e3a90) releasing from 1
    trace:dinput:check_hook_thread IDirectInputs left: 0
    trace:dinput:hook_thread_proc Processing hook change notification lp:0
    fixme:d3d:IWineD3DDeviceImpl_EvictManagedResources (0x125ea0) : stub
    fixme:d3d:IWineD3DDeviceImpl_EvictManagedResources (0x125ea0) : stub
    fixme:d3d:IWineD3DDeviceImpl_EvictManagedResources (0x125ea0) : stub
    fixme:d3d:IWineD3DDeviceImpl_EvictManagedResources (0x125ea0) : stub
    fixme:d3d:IWineD3DDeviceImpl_EvictManagedResources (0x125ea0) : stub
    fixme:d3d:IWineD3DDeviceImpl_EvictManagedResources (0x125ea0) : stub
    fixme:d3d:IWineD3DDeviceImpl_EvictManagedResources (0x125ea0) : stub
    fixme:d3d:IWineD3DDeviceImpl_EvictManagedResources (0x125ea0) : stub
    errle:CoUninitialize Mismatched CoUninitialize
    Towards the end is the area of interest. It appears that DInput is reocgnizing the joystick wrong and then rejecting it. At least that's the vibe I get from the 'trace:dinput:IDirectInputAImpl_Release (0x39e3a90) releasing from 1' line.

    I tried the known registry fix for this as suggested by someone in the #winehq channel. It looked promising, however even with this set the gamepad failed to register properly. For a reference screenshot to make sure everything appears normal with the registry key, you can visit:

    http://i20.photobucket.com/albums/b2.../Reappear1.png

    Clicking the picture will, of course, make it slightly larger and then the text in the terminal is legible for a reference.

    I also stumbled across this forum post:

    http://www.groupsrv.com/computers/about242352.html

    And in a nutshell, the guy seems to be having basically the same problem as me. Someone in the forum recommended running a "Wine Joystick Test".

    There is a joystick test in wine:
    cd wine/dlls/dinput/tests
    WINETESTINTERACTIVE=1 wine dinput_test.exe.so joystick

    This should show you what is going on.

    You can also run it as:
    WINEDEBUG=+dinput WINETESTINTERACTIVE=1 wine dinput_test.exe.so joystick
    to really see what is going on.
    Now the first thing that hit me here was, "Ahhh It's in the source code!". But when I downloaded the source and navigated to the mentioned directory, the closest file to the one mentioned I could find was 'dinput_test.h' and of course that isn't an executable file.

    I don't believe this is so much of a problem with the joystick not working from game to game, I believe wine is not intializing it as it should. This gamepad runs perfect in native Linux apps such as ZSNES and works fine under jscalibrator with an ID of '/dev/input/js0'. When I try to run FlatOut 2 however for example, It's not even listed under the detected input devices. Some people said that FlatOut 2 requires DInput8.dll which I tried placing in both the game directory and the system32 directory, but this failed to rectify the problem. And remember, It's not just this game that the gamepad fails to function in .


    Any ideas as to whats wrong here? Driving a car really sucks with the keyboard .

    Thanks in advance.

  2. #2

    Default

    Nevermind. Problem solved.

    The fix was actually very simple. I didn't have the proper permissions set for /dev/input/event*

    The joystick test module appears within the source directory after the source has been compiled.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •