Posts: 14
Joined: Mar 2008
Reputation:
0
frain
Junior Member
Posts: 14
I wrote an EventClient in C++ for the Xbox 360 Controller for Windows. I've tested it in Windows Vista 32bit. From trac:
"This patch adds the C++ code for an Xbox 360 Controller EventClient for Windows (using XINPUT). A new project is added to the XBMC VSE2008 solution from which the EventClient can be compiled. The EventClient has no user interface - it simply sends the data received from the first connected controller to XBMC listening on localhost (using the "XG" [Xbox gamepad] device map). At the moment, I do not have time to add further features, so I'm submitting the patch as the basic functionality is working correctly."
Posts: 7,256
Joined: Nov 2008
Reputation:
121
Can you post a link to the ticket? I've been struggling to get an eventclient to work and I would be very interested to see your code.
Thanks,
John Rennie
Posts: 7,256
Joined: Nov 2008
Reputation:
121
The problem I had was working out what to send. For example I worked out that you have to OR the keycode with 0xF000 by trial and error. Also my example doesn't work unless I include BTN_QUEUE in the flags, but I can't find a description of what this flag means or why it might be necessary. I notice your code does not use it.
John Rennie
Posts: 2,745
Joined: Oct 2003
Reputation:
1
WiSo
Team-Kodi Developer
Posts: 2,745
Unfortunately I can't test this due to a missing x360 controller but I'm happy that someone tried the event client method. It would be nice if we could get more event clients also for other remotes and together with topfs we might add missing pieces to the event server.
Posts: 7,256
Joined: Nov 2008
Reputation:
121
Having to run separate processes is always going to be clunky. The event server is neat, but I don't think it's ideal for supporting things like IR remotes. I can see a role for controlling XBMC remotely from a different PC, but I doubt this would be a common requirement.
The best solution would be to support event hooks in a dll. This is pretty standard practice in Windows, though I don't know how easy it would be to do cross platform without an untidy maze of #ifdefs.
JR
Posts: 24
Joined: Nov 2008
Reputation:
0
Awen
Junior Member
Posts: 24
@jhsrennie: could you be more specific ? On a low scaled htpc, i can evaluate how task switching may be painful, fe while decoding some hd video... but on a reasonably modern box, i'm pretty confident about multitasking a bunch(3-4) of spinning tasks, and still having good response-time... Is the hd decoding, the worst case situation you're afraid of ?
Awen
Posts: 952
Joined: Feb 2005
Reputation:
0
Would it be possible to get it to work on the old Xbox provided you add the wireless receiver via USB available for the pc?
Posts: 96
Joined: Feb 2008
Reputation:
1
Can't get this patch applied with tortoiseSVN, it doesn't like line 486 for some reason...