Xbox 360 Controller EventClient
#16
frain Wrote:I posted an updated diff to http://trac.xbmc.org/ticket/5299. The diff should now apply cleanly to the SVN version (this time, I checked out a fresh copy and verified this fact).

Thank you, it patched correctly now. Smile

I compiled an installer and installed it, however the controller doesn't work. Am I missing something? (Tested on Vista Home Basic 32bit, Vista Home Premium 64bit)
Reply
#17
bb10 Wrote:Thank you, it patched correctly now. Smile

I compiled an installer and installed it, however the controller doesn't work. Am I missing something? (Tested on Vista Home Basic 32bit, Vista Home Premium 64bit)

You need to run the Xbox360EventClient.exe program separately. It should be built to project/VS2008Express/Release/Xbox360EventClient.exe.

Thanks a lot for testing this!
Reply
#18
frain Wrote:You need to run the Xbox360EventClient.exe program separately. It should be built to project/VS2008Express/Release/Xbox360EventClient.exe.

Thanks a lot for testing this!

Confirmed working on both 32bit and 64bit vista. Smile

It still has some things missing like the triggers not doing anything, but I guess that has to do with the mapping?

Also, wouldn't it be more elegant if it was integrated in XBMC or is this just a test?
Reply
#19
bb10 Wrote:Confirmed working on both 32bit and 64bit vista. Smile
Nice Smile
Quote:It still has some things missing like the triggers not doing anything, but I guess that has to do with the mapping?
Hm, I don't use the triggers so I don't know - they should work in principle. I will investigate this!
Quote:Also, wouldn't it be more elegant if it was integrated in XBMC or is this just a test?
As far as I'm aware, this is the new-ish and preferred way to implement input devices for XBMC (see a related wiki entry here). Also, by seperating input handling and the other XBMC functions, people can run EventClients and EventServers on different machines, enabling for example the use of the XBox360 controller with XBMC running on an XBox (like ultrabrutal described above), which would otherwise be impossible.

People more involved with the XBMC development should of course feel free to correct any errors in the above explanation!
Reply
#20
I submitted an updated patch to http://trac.xbmc.org/ticket/5299#comment:7. Note the following:
  • a bug is fixed which caused the handling of analog triggers and thumbsticks to be incorrect and
  • the Xbox360EventClient now has to be compiled separately, using the project file in tools/EventClients/Clients/Xbox360 Controller.
Reply
#21
frain Wrote:I submitted an updated patch to http://trac.xbmc.org/ticket/5299#comment:7. Note the following:
  • a bug is fixed which caused the handling of analog triggers and thumbsticks to be incorrect and
  • the Xbox360EventClient now has to be compiled separately, using the project file in tools/EventClients/Clients/Xbox360 Controller.

Thanks! Great work. Smile
Reply
#22
First off I'd like to say THANKS FRAIN for this awesome EventClient, IMO XBMC without an Xbox-like controller just isn't the same. I don't mind at all starting it up before XBMC Windows, and it works wonderfully. Also THANKS TEAM XBMC for making the awesomesauce media center for free.

I'm using Vista64 and the Microsoft USB Xbox360 wireless dongle with XBMC Atlanis. I'm using Visual Studio 2008 Pro and not Express, so I don't currently have the ability to make my own builds, but I can at very least compile this EventClient. Smile

I have no complaints! One very minor difference from XBMC on the Xbox seems to be with the speed of the acceleration/repeat of the shoulder triggers, which is significantly slower than XBMC Xbox. I have noticed that there are timing knobs in the EventClient config menu, so perhaps I will try tuning that and post the values which feel "Xbox-like".

The other more significant difference is that the original patch does not map anything to the "white" and "black" buttons on the Xbox controller, so there is no way to enqueue playlist items or see the playlist. Fortunately the Xbox 360 Wireless controller has two remaining unmapped buttons, the left and right shoulder buttons.

Here's a small patch which makes the left and right shoulder buttons behave like "white" and "black", respectively. I have tested it, and it works as expected.

I'm not sure what arguments I should give diff to create a .patch, so here's the diff.

tools/EventClients/Clients/Xbox360/Xbox360EventClient.cpp

Xbox360EventClient.shoulderbuttons.patch
"
110,111c110,116
< checkButton(cont, client, 12, "lefttrigger");
< checkButton(cont, client, 13, "righttrigger");
---
> // these buttons are not yet mapped in XBMC/xbmc/ButtonTranslator.cpp
> // and therefore are used as "white" and "black" respectively, as white
> // is left of black on the original xbox controller.
> // checkButton(cont, client, 12, "leftshoulderbutton");
> // checkButton(cont, client, 13, "rightshoulderbutton");
> checkButton(cont, client, 12, "white");
> checkButton(cont, client, 13, "black");
"

I'm don't know why things are defined the way they are in ButtonTranslator.cpp, so I'm not sure whether it's more "correct" to do the above commented "leftshoulderbutton" "rightshoulderbutton" names, and define them in ButtonTranslator.cpp to be equivalent in the UI to "white" and "black?"

=darwin
Reply
#23
Opened a new ticket #5896 with the shoulder button patch. Hopefully it will get added soon. Smile


@ frain
I was wondering... would it be hard to implement the eventclient as a windows service that starts and stops with XBMC? I understand if you don't have the time to do it, but maybe it's not much work?
Reply
#24
@frain
Man, you saved my life. I was going to dump XBMC for Windows because everything I tried getting my Wireless 360 controller to work just wasn't working properly. This Event Client was the cherry on top for me. Many thanks!!


@bb10
I tried and created a service using "sc.exe" (see http://support.microsoft.com/kb/251192/en-us)

After turning "Xbox360EventClient.exe" into a service, it works only during service startup. It somehow doesn't signal Windows that the service is loaded and then exits after timing out with error "Error 1053: The service did not respond to the start or control request in a timely fashion"
It probably has to do with "Xbox360EventClient.exe" having an infinite loop in main().


@darwin
Thanks for the patch.
Meanwhile, you can temporary change "Keymap.xml", replacing everything "white" with "leftshoulderbutton" and "black" with "rightshoulderbutton" which also does the trick.

edit: Never mind, just saw that its already included in 17720. thanks bb10


Cheers
Bunts
Reply
#25
Thanks for the kind words everyone, I am glad that there are people that find my code useful!

Regarding making the EventClient into a Windows service: I don't know too much about Windows programming, and for me the commandline application suffices. I don't think it should be too hard to do, though: If anyone wants to give it a try, I think the following MSDN article on creating Win32 services in C++ might be a good starting point: http://msdn.microsoft.com/en-us/library/ms810429.aspx.
Reply
#26
Is this the EventClient they say is in 9.04Huh

Then Why isn't my 360 controller recognised? I can't even find EventServer in the settings in 9.04...
Reply
#27
how do that thing work? i dont know how to compile things. Can someone provide a compiled file, please.

edit: never mind. i found a compiled file somewhere with google.
it works great!
thanks to the programmers!

edit2:
now i have another question.
if xbmc is not in the foreground of the screen. lets say i start a game. then the controller anyhow sends commands to xbmc. this can have confusing results. is this behavior normal, or i am doing something wrong?
Reply
#28
hansdampf Wrote:now i have another question.
if xbmc is not in the foreground of the screen. lets say i start a game. then the controller anyhow sends commands to xbmc. this can have confusing results. is this behavior normal, or i am doing something wrong?

That's a good question - I was wondering about that issue, but as I don't launch any programs from XBMC (yet) I did not look into the XBMC code to see how this problem could be fixed.

Probably when things like the XBMC Game Library are done, the XBMC EventServer should ignore EventClient input while other programs are running.
Reply
#29
Ok, I need an idiots guide on how to start Eventclient...

In the changelog for 9.04.1 I could read:
* Xbox 360 Controller EventClient

But I can't for the life of me find the eventclient.exe that I need to run, neither does XBMC start it automatically when I plug in my Xbox 360 controller.

Please help!
Reply
#30
just use eventghost you add the take create switch events plugins and when example what im using it for mpc-hc you create a macro which will make a folder to run in exclusive mode with the event ex:[Task.NewWindow.mplayerc] and in the exclusive folder you put a macro which detect ex:[Task.ClosedWindow.mplayerc] and desactivate the exclusive mode for the folder.
Reply

Logout Mark Read Team Forum Stats Members Help
Xbox 360 Controller EventClient4