Fix Xbox 360 controller support

  Thread Rating:
  • 4 Votes - 4.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
natethomas Offline
Team Kodi Community Manager
Posts: 3,747
Joined: Apr 2008
Reputation: 63
Location: Kansas
Post: #106
(2012-12-07 21:45)DDDamian Wrote:  Gotta say - on a Windows system the combined work here of shiretoko212 and da-anda has made this controller my first choice again for a remote. Fantastic work!

Having the analog sticks respond as button presses would be about the only other magic I can think of, but I haven't looked at what code changes are required.

Looks for a bit of credit, sees none, feels sad. Sad

Smile

The analog sticks already respond as button presses on Windows, DDDamian. Check the visual guides on the wiki. http://wiki.xbmc.org/index.php?title=Xbo...or_Windows

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]
find quote
DDDamian Offline
Team-XBMC Developer
Posts: 3,030
Joined: Sep 2011
Reputation: 254
Location: Canada
Post: #107
(2012-12-07 23:16)natethomas Wrote:  
(2012-12-07 21:45)DDDamian Wrote:  Gotta say - on a Windows system the combined work here of shiretoko212 and da-anda has made this controller my first choice again for a remote. Fantastic work!

Having the analog sticks respond as button presses would be about the only other magic I can think of, but I haven't looked at what code changes are required.

Looks for a bit of credit, sees none, feels sad. Sad

Smile

The analog sticks already respond as button presses on Windows, DDDamian. Check the visual guides on the wiki. http://wiki.xbmc.org/index.php?title=Xbo...or_Windows

Yikes! Sorry Nate - guilty as charged Wink I did see all the work you did!

They do indeed work as keypresses just at warp-speed, so are kinda unusable. Map one for menu navigation or try to move smoothly thru a scan. That was more of what I meant Smile

System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon AVR-3808CI - Denon DVD-5900 Universal Player - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray - X-Box 360 - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!
(This post was last modified: 2012-12-07 23:23 by DDDamian.)
find quote
shiretoko212 Offline
Team-Kodi Member
Posts: 156
Joined: Jul 2012
Reputation: 1
Post: #108
I agree dddamian. There should be an input multiplier setting for mappings on axes. it would simply cause xbmc to reduce or grow the input speed by factor x. How can we make that happen? outside of fixing osx and linux support and crash reports when wireless controllers sleep, that's highly requested.
find quote
DDDamian Offline
Team-XBMC Developer
Posts: 3,030
Joined: Sep 2011
Reputation: 254
Location: Canada
Post: #109
I know both da-anda and memphiz have done some work in this area, as has jmarshall. One of us will likely poke at it soon (but be aware any API changes would have to be post-Frodo).

No crash issues on controller sleep here - Win64 and official controller.

Between this work and the auto-scrolling CULRC-Lyrics script work by ronie, amet and others the WAF just went up here significantly Smile

System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon AVR-3808CI - Denon DVD-5900 Universal Player - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray - X-Box 360 - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!
find quote
shiretoko212 Offline
Team-Kodi Member
Posts: 156
Joined: Jul 2012
Reputation: 1
Post: #110
I don't experience wireless crashes either. for what it's worth
find quote
DukeOfTheWicked Offline
Member
Posts: 82
Joined: Oct 2010
Reputation: 0
Location: USA
Post: #111
WOW.
I just came to this thread to ask if this supported the 360 controller in Ubuntu (since the controller works in Ubuntu out-of-the-box). But I guess the title was edited to reflect that you are one step ahead.

Now i just wonder if this support will be included with the FINAL of XBMC Frodo.

Thanks for this.

My XBMC/Gaming rig:
Cougar Evolution - AMD Phenom II 1100T @ 4ghz w/ custom Noctua 3-fan Cooler - 16gb DDR3 1866 - ASUS Sabertooth 990FX - Nvidia GTX570 superclocked -
SeaSonic Platinum 860W PSU - OCZ Agility 3 240GB SSD - 8TB storage
Mouse- Cyborg R.A.T. 5 Keyboard- Mad Catz V.7
find quote
JoelB Offline
Junior Member
Posts: 3
Joined: Dec 2012
Reputation: 0
Post: #112
Thanks to shiretoko212, natethomas, and everyone else that's worked on this. I was wondering if you could add support for the Logitech XInput controllers (which are, along with the official 360 controllers, recommended by Valve for use with Steam's Big Picture mode). Here are the device names:

Controller (Wireless Gamepad F710)
Controller (Rumble Gamepad F510)
Controller (Gamepad F310)

I've tested the F710 with the keymap included in Frodo Beta 3 (on Windows 7) and it works flawlessly. I found the device names for the other two models via a cursory Google search, and they should work as well since they are functionally identical to the F710.

If I may, I'd also like to offer a few suggestions for changing the keymap a little. There are a couple of actions in the FullscreenVideo section that I really miss from my previous custom keymap:

1. AudioNextLanguage: I really enjoy audio commentaries and retain the commentary tracks in all my rips, so it's nice to have quick access to them. Being audio-related, this seems to make sense on the right stick button (with the right stick currently controlling volume), and the button's current functionality (OSD) is duplicated by the X button anyway.

2. ShowSubtitles: The Info action is pretty redundant in video playback when you already have the OSD (the only thing Info shows that isn't on the OSD is the end time, right?), so why not use the right shoulder button to toggle the display of subtitles?

I don't mind having to modify the default keymap (as I've already done), but I do think these are two relatively common and useful features that would pack even more value into an already excellent keymap. Thanks for considering it, anyway!
find quote
eulersid Offline
Junior Member
Posts: 1
Joined: Dec 2012
Reputation: 0
Post: #113
My Razor Onza Tournament xbox/pc controller wasn't recognised, here is its device name: Controller (XBOX360 GAMEPAD)

I checked both layouts and its working perfectly. I'm on Windows 7, if it matters.

I really don't have any complaints about the layout, except I'd like to be able to use the left stick for navigation. Thanks for the awesome media remote!
find quote
shiretoko212 Offline
Team-Kodi Member
Posts: 156
Joined: Jul 2012
Reputation: 1
Post: #114
I added all 4 device names both of you reported to a new version of the Windows keymap in the parent post, v2.0.0. Hopefully, someone will see this and add it to a PR soon.

As an aside, the keymap api needs to allow for a device name list at the beginning of a keymap that applies to every section in the keymap file. Having device names listed 40 times each is messy but unfortunately necessary right now. Can this happen in Frodo? I'm fine with having a ridiculously huge keymap file in the interim if it means supporting every device possible, though. Also, hopefully someone can make a PR for my linux keymaps. They still aren't fixed completely (needs more testing and help from everyone), but at least if they are part of xbmc, the Linux device names will map to something.

JoelB: Regarding the button changes you have in mind, I'd like to hear from natethomas and others on it. I like having access to info on the shoulder button to be able to see the end time, but I agree it is a little redundant in video mode. Natethomas would have to update the video controller image. Having direct button control over audio language and subtitles so easily would be nice, though doesn't xbmc usually default to the best audio and subtitle options? Would having these things on buttons possibly cause people press them mid-viewing accidentally? I'm not against the changes, just a few concerns.
(This post was last modified: 2012-12-10 17:09 by shiretoko212.)
find quote
natethomas Offline
Team Kodi Community Manager
Posts: 3,747
Joined: Apr 2008
Reputation: 63
Location: Kansas
Post: #115
Putting AudioNextLanguage on the right stick wouldn't bother me too much, since the OSD is, indeed, redundant and imo sort of a tricky button to push, so not likely to get hit accidentally.

I practically never mess with subtitles. The joy of being an English speaker who only watches maybe 2 foreign language films a year...

With that said, the fact that we default subtitles on does suggest that easy access to subtitle switching would be nice. The only problem I see with it is I'm not sure that there's another way to call up the Info screen using only the controller. We can change subtitles using the OSD. If we are going to get rid of a feature altogether, it should be a feature that is only using for debugging or nerding out. For example, I wouldn't be opposed to putting ShowSubtitles on the right shoulder, and then removing Codec Info from start, and replacing that with the Info screen.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]
find quote
natethomas Offline
Team Kodi Community Manager
Posts: 3,747
Joined: Apr 2008
Reputation: 63
Location: Kansas
Post: #116
Keymaps being huge are guaranteed to remain in place through Frodo. I wouldn't begin to know how to fix that problem, and, even if I did, it'd be a big enough change that I could see our Release Manager throwing a massive rage fit if we tried to sneak it in. Easier and better for now to deal with ugly but working keymaps, and hope to get in a better fix in either XBMC 13 or an XBMC 12 point release.

I don't believe we'll have time to get the current keymap in for the next Beta/RC release, but I'll ping da-anda. We should be able to get it in for the next one, if we miss this window. Shiretoko, to me it appears that all the altnames for xpad differ from the altnames for Windows. Is that right? If so, that should make the Linux version keymap a fairly easy sell.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]
find quote
shiretoko212 Offline
Team-Kodi Member
Posts: 156
Joined: Jul 2012
Reputation: 1
Post: #117
natethomas: Since the latest xpad.c should contain every single altname applicable to Linux, sounds like it. However, there is a single overlap right now: "Xbox 360 Wireless Receiver". I don't think that's a Windows device name though, so it should be removed from the Windows keymap to avoid conflicts. My official wireless controller in Windows shows up as "Controller (Xbox 360 Wireless Receiver for Windows)". Outside of that, those linux issues still exist (broken triggers, start button missing, and possible unconfirmed other random mappings for unofficial hardware). It wouldn't hurt to put something in at least, so 360 controllers on Linux are recognized by default, even if the keymap isn't perfected yet. If we are going to add subtitle and audio track mappings to the video mode, I need to apply that to the xpad keymap as well.

Just let me know how I can help.
(This post was last modified: 2012-12-10 17:38 by shiretoko212.)
find quote
natethomas Offline
Team Kodi Community Manager
Posts: 3,747
Joined: Apr 2008
Reputation: 63
Location: Kansas
Post: #118
Alright, I've pushed the Linux and Windows keymaps together into one giant keymap, and also got rid of altnames in categories where no additional button mappings where necessary. This is tested working in Windows. If you could check linux, shiretoko, I think we're all set for the next beta/rc release.

http://pastebin.com/rM0fuwqS

I have not changed the button maps on the two suggestions, simply because I wasn't sure if everyone was on board with that.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]
find quote
shiretoko212 Offline
Team-Kodi Member
Posts: 156
Joined: Jul 2012
Reputation: 1
Post: #119
Great idea. One giant keymap is a good stop gap solution. I see you already removed the overlapping device name from the Windows section. It still needs the 4 new device names recently reported added to the Windows sections: Controller (Gamepad F310), Controller (Rumble Gamepad F510), Controller (Wireless Gamepad F710), Controller (XBOX360 GAMEPAD).
find quote
JoelB Offline
Junior Member
Posts: 3
Joined: Dec 2012
Reputation: 0
Post: #120
Thanks for the feedback, guys:

(2012-12-10 16:44)shiretoko212 Wrote:  Having direct button control over audio language and subtitles so easily would be nice, though doesn't xbmc usually default to the best audio and subtitle options? Would having these things on buttons possibly cause people press them mid-viewing accidentally? I'm not against the changes, just a few concerns.

In my use cases, XBMC's auto-selection of audio/subtitle tracks doesn't come into play -- at least not until XBMC can read my mind and tell when I want to listen to a commentary track or need to turn on subtitles 'cause I have no idea what that guy just said (I think I'll hold off on making that feature request just yet). Also, I don't think it's any worse/better than having aspect ratio toggling on a button, which is a feature I personally don't use but would be annoying if I accidentally bumped it mid-viewing.

(2012-12-10 17:15)natethomas Wrote:  With that said, the fact that we default subtitles on does suggest that easy access to subtitle switching would be nice. The only problem I see with it is I'm not sure that there's another way to call up the Info screen using only the controller. We can change subtitles using the OSD. If we are going to get rid of a feature altogether, it should be a feature that is only using for debugging or nerding out. For example, I wouldn't be opposed to putting ShowSubtitles on the right shoulder, and then removing Codec Info from start, and replacing that with the Info screen.

I should have mentioned that alternative in my previous post, as that's what I actually did with my modified keymap. I prefer a mostly redundant Info overlay over Codec Info, although I'm fairly ambivalent on the issue.

Thanks again for taking this into consideration. I really appreciate it.
find quote
Post Reply