OnLive, XInput, and 360 Gamepad

Questions about Wine on Linux
Locked
tazr42
Newbie
Newbie
Posts: 1
Joined: Sun Jul 22, 2012 7:45 am

OnLive, XInput, and 360 Gamepad

Post by tazr42 »

Hi,

I've been tinkering trying to get OnLive to work with the Xbox 360 controller, and got to the limit of my ability so wondering if anyone has any clues.

I'm using xpad, and that recognises my wireless controller no problem (USB adapter that came with the controller).

I've taken the patch which Michael Gruber created in 2009 ( http://marc.info/?l=wine-patches&m=124710119700598&w=4 ), and made a few changes to increase logging and for it to actually compile, and a couple of tweaks correcting the buttons used (the D-Pad was listed as axes rather then buttons). I can provide is required, but not sure how to attach files to posts.

Testing it with Braid via wine (yes, I know can play it natively, but testing wine + 360 controller) it worked perfectly.

I've taken my information from MSDN:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx

Braid just called XInputGetState and it gets the current buttons being pressed and works.

OnLive does a few things:
Enables XInput,
Runs XInputGetCapabilities
But then it will detach the DLL and never reattach it (although it will send XInputSetState in future).

I've checked the MS documentation and for the XInputGetCapabilities call I believe I'm putting the correct info into the struct (Type: 1, SubType: 1, Gamepad: 62463, LTrig: 255, RTrig: 255, LX: 32767, LY: 32767, RX: 32767, RY: 32767, Vl: 255, Vr: 255) and it should work. But it just doesn't seem to do anything.

Obviously I've set xinput1_3.dll to use the wine version in winecfg, tried it with Windows 7 and XP, but I really don't think the problem is that high up. I think it's just OnLive is expecting something funky with the XInputGetCapabilities call, but I can't figure out what. Or I'm missing something.

I've asked OnLive but they're not going near Linux support with a barge pole.

Below is the output (with crude messages I've put in to trace things) and a few <------ comments:

Code: Select all

wine: cannot find L"C:\\windows\\system32\\winemenubuilder.exe"
err:wineboot:ProcessRunKeys Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (2)
fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
fixme:toolhelp:Heap32ListFirst : stub
fixme:dwmapi:DwmIsCompositionEnabled 0xc0f7dc
fixme:wbemprox:wbem_locator_ConnectServer 0x139d78, L"\\\\.\\root\\cimv2", (null), (null), (null), 0x00000000, (null), (nil), 0xc0f5d0)
fixme:xinput:XInputEnable (1) Stub!       <----Enables xinput, returns a void so shouldn't be complaining at that
fixme:xinput:XInputGetCapabilities (0 0 0xc0f6fc) <----- Call from the app with pointer to struct listed as an 'out' parameter
fixme:xinput:XInputGetState (0 0xc0f6b0)  <------ Call made internally from xinput1_3.dll.so
fixme:xinput:xinput_find_joydevs g   <------- Ahem, my random debugging to see where it's getting to
fixme:xinput:xinput_find_joydevs h
fixme:xinput:xinput_find_joydevs i
fixme:xinput:xinput_find_joydevs j
fixme:xinput:xinput_find_joydevs Added device /dev/input/event5 as Xbox360 Controller 0: Xbox 360 Wireless Receiver
fixme:xinput:xinput_find_joydevs  ... with rumble
fixme:xinput:xinput_find_joydevs g
fixme:xinput:xinput_find_joydevs g
fixme:xinput:xinput_find_joydevs g
fixme:xinput:XInputGetState PackNo: 1, wButt: 0, lTr: 0, rTr: 0, LX: 2944, LY: 626, RX: 1924, RY: 6310         <----- The actual controller state
fixme:xinput:XInputGetCapabilities DEVICE CONNECTED, Type: 1, SubType: 1, Gamepad: 62463, LTrig: 255, RTrig: 255, LX: 32767, LY: 32767, RX: 32767, RY: 32767, Vl: 255, Vr: 255        <------ The struct for the out parameter. The MS documentation specified 1 for buttons and the max value for others
fixme:xinput:XInputGetCapabilities (1 0 0xc0f6fc)     <------ As the first returns ERROR_SUCCESS I guess it'll then check for a second controller. So it sees the first as SOMETHING, even if it's just "not supported"
fixme:xinput:XInputEnable (0) Stub!      <------- I believe this is called with the detaching of the dll
fixme:win:RegisterRawInputDevices (pRawInputDevices=0xc0f61c, uiNumDevices=1, cbSize=12) stub!
fixme:win:EnumDisplayDevicesW ((null),0,0x15fe03c,0x00000000), stub!
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:thread:SetThreadIdealProcessor (0x144): stub
fixme:thread:SetThreadIdealProcessor (0x148): stub
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:dwmapi:DwmIsCompositionEnabled 0xc0f7f0
fixme:win:EnumDisplayDevicesW ((null),0,0xc0f2a0,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),1,0xc0f298,0x00000000), stub!
fixme:win:EnumDisplayDevicesW (L"\\\\.\\DISPLAY1",0,0xc0f248,0x00000000), stub!
fixme:wlanapi:WlanOpenHandle (1, (nil), 0xc0f65c, 0xc0f638) stub
fixme:wbemprox:wbem_locator_ConnectServer 0x1468e0, L"\\\\.\\root\\cimv2", (null), (null), (null), 0x00000000, (null), (nil), 0xc0f7d4)
fixme:win:EnumDisplayDevicesW ((null),0,0xc0e388,0x00000000), stub!
fixme:win:EnumDisplayDevicesW ((null),0,0xc0e2a8,0x00000000), stub!
fixme:ddraw:ddraw7_Initialize Ignoring guid {aeb2cdd4-6e41-43ea-941c-8361cc760781}.
fixme:devenum:DEVENUM_ICreateDevEnum_CreateClassEnumerator Category {cc7bfb41-f175-11d1-a392-00e0291f3959} not found
fixme:devenum:DEVENUM_ICreateDevEnum_CreateClassEnumerator Category {cc7bfb46-f175-11d1-a392-00e0291f3959} not found
fixme:win:EnumDisplayDevicesW ((null),0,0xc0f2f0,0x00000000), stub!
20120722_133920+0100 : 76c871a4-7b90-3b43-8527-576a552cf5fb
fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot
fixme:toolhelp:Heap32ListFirst : stub
fixme:winsock:WSAIoctl WS_SIO_UDP_CONNRESET stub
fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
fixme:winsock:WSAIoctl WS_SIO_UDP_CONNRESET stub
fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
fixme:winsock:WSAIoctl WS_SIO_UDP_CONNRESET stub
fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
fixme:winsock:WSAIoctl WS_SIO_UDP_CONNRESET stub
fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
fixme:winsock:WSAIoctl WS_SIO_UDP_CONNRESET stub
fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
fixme:winsock:WSAIoctl WS_SIO_UDP_CONNRESET stub
fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
fixme:winsock:WSAIoctl WS_SIO_UDP_CONNRESET stub
fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
fixme:winsock:WSAIoctl WS_SIO_UDP_CONNRESET stub
fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
fixme:winsock:WSAIoctl WS_SIO_UDP_CONNRESET stub
fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
fixme:wlanapi:WlanOpenHandle (1, (nil), 0xc0ec78, 0xc0ec70) stub
fixme:winsock:WSAIoctl WS_SIO_UDP_CONNRESET stub
fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
20120722_133956+0100 : aq8Td3x91fMRTvYZgUvLDF
fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
fixme:xinput:XInputSetState (0 0x453e8a8) Sktub!    <-------- Sends SetState, used for vibrate, think it's just sending and doesn't check if there's a controller attached, but it gets to xinput1_3.dll.so anyway
fixme:xinput:xinput_find_joydevs g
fixme:xinput:xinput_find_joydevs h
fixme:xinput:xinput_find_joydevs i
fixme:xinput:xinput_find_joydevs j
fixme:xinput:xinput_find_joydevs Added device /dev/input/event5 as Xbox360 Controller 0: Xbox 360 Wireless Receiver
fixme:xinput:xinput_find_joydevs  ... with rumble
fixme:xinput:xinput_find_joydevs g
fixme:thread:SetThreadIdealProcessor (0x354): stub
fixme:thread:SetThreadIdealProcessor (0x358): stub
fixme:xinput:xinput_find_joydevs g
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:xinput:xinput_find_joydevs g
fixme:xinput:XInputSetState (1 0x453e8a8) Sktub!
fixme:xinput:XInputSetState (2 0x453e8a8) Sktub!
fixme:xinput:XInputSetState (3 0x453e8a8) Sktub!
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:d3d:resource_check_usage Unhandled usage flags 0x8.
fixme:xinput:XInputSetState (0 0x453e8a8) Sktub!
fixme:xinput:XInputSetState (1 0x453e8a8) Sktub!
fixme:xinput:XInputSetState (2 0x453e8a8) Sktub!
fixme:xinput:XInputSetState (3 0x453e8a8) Sktub!
fixme:xinput:XInputSetState (0 0xe72e934) Sktub!
fixme:xinput:XInputSetState (1 0xe72e934) Sktub!
fixme:xinput:XInputSetState (2 0xe72e934) Sktub!
fixme:xinput:XInputSetState (3 0xe72e934) Sktub!
fixme:xinput:XInputSetState (0 0xe72e934) Sktub!
fixme:xinput:XInputSetState (1 0xe72e934) Sktub!
fixme:xinput:XInputSetState (2 0xe72e934) Sktub!
fixme:xinput:XInputSetState (3 0xe72e934) Sktub!
Any bright ideas would be great.

Thanks.
greniesa
Newbie
Newbie
Posts: 1
Joined: Fri Apr 05, 2013 1:08 pm

Re: OnLive, XInput, and 360 Gamepad

Post by greniesa »

I don't know want happen with your work, but I hope you still try to figure it out!

I haven't any knowledge that can help you, but I really appreciate that someone try to do something about this problem.
Simon of Aragon
Level 3
Level 3
Posts: 94
Joined: Sat Sep 08, 2012 3:56 pm

Re: OnLive, XInput, and 360 Gamepad

Post by Simon of Aragon »

Wow! I thought I was the only necromancer in these parts. :D

Seriously though Greniesa, I want to extend a warm welcome to the WINE forums and ask you what part of this topic caught your attention? Was it the OnLive or the Gamepad on PC? I don't have any experience with OnLive but I know it is a game console app for the PC. I do currently use my PS3 usb on my PC and have no clue on how I would hook up a wireless gamepad. So I can imagine why the thread went dead. But please elaborate on why this interested you and maybe someone here has an answer.
Locked