Win Guide button on game controller on Windows 10
#1
Guide button on game controller on Windows 10 normally starts the Windows 10 "Game Bar".  To disable:

How to stop Do you want to open game bar?
You can stop Game bar from opening when the "Xbox/Guide" button is pressed in Windows Settings. Press the Start button, select Settings > Gaming > Game bar, and then clear the Open Game bar using this button on a controller: checkbox.

You also may need to disable it in steam or quit steam while using Kodi.

This problem does not exist on Debian Linux Smile
Reply
#2
Thanks for describing the fix! We used to intercept the guide button, but it used a private Microsoft API and might have been causing crashes on Windows 10. Once disabled, does the guide button actually work in Kodi? If so I'll add your fix to our wiki.
Reply
#3
Hi. The Guide button doesn't work in Kodi at the moment. Is there a chance to fix this? I'm pretty sure it used to work before. The Guide button does work in Steam, it can start the Game Bar if the setting is enabled, Firefox supports it too, online tests (like this one https://gamepad-tester.com/) detects the Guide button as #16.
Reply
#4
The Guide button isn't exposed to the public XInput API. We used to use hook into a private XInput API, but it started causing crashes so we no longer do.

If Firefox supports it, I can look into the code and see if there's a more modern way to support the Guide button.
Reply
#5
https://searchfox.org/mozilla-central/so...amepad.cpp
Code:
// In XInputGetState, we can't get the state of Xbox Guide button.
// We need to go through the undocumented XInputGetStateEx method
// to get that button's state.
const LPCSTR kXInputGetStateExOrdinal = (LPCSTR)100;
// Bitmask for the Guide button in XInputGamepadEx.wButtons.
const int XINPUT_GAMEPAD_Guide = 0x0400;
Looks like they use the private XInput API just like you did before.
Reply
#6
Yeah, I think we used that exact code, but in the newer XInput DLL it crashed Kodi. How about if I yolo the code back in and we see what breaks?
Reply
#7
And thus I have done so: https://github.com/xbmc/peripheral.joystick/pull/288

I'll include this in my new round of RetroPlayer builds for testing: https://github.com/garbear/xbmc/releases
Reply
#8
Unfortunately, enabling the guide button for Windows completely broke controllers on Xbox, kinda a necessity. I've reverted for now. I'll see what I can do about only selectively enabling the guide button for Windows.
Reply
#9
Update on the Guide button for Windows 10. We enabled it, but it broke Xbox. So now we've disabled it on Windows UWP (Xbox and Windows store) and enabled it on Windows Desktop (the x86 and x64 releases). New releases of peripheral.joystick for Kodi v21 Omega are on the mirrors. Help testing to see if the guide button works on v21 (after updating peripheral.joystick) would be appreciated.
Reply
#10
Hello there.  I was searching for a way to get the XBOX button on my XBOX One S controller to work as the Guide button in Kodi and came across your post.  It looks like you got it working in your latest RetroPlayer 20.2 version of Kodi.  I've only ever used the main version of Kodi from their website and was wondering what is the major difference between your version and the official one?  I ask because I thought RetroPlayer was already in (or could be added to) the main version of Kodi.  I noticed that the main version of Kodi was recently updated to 20.3 but I didn't see anything in their changelog as adding the use of the XBOX button as the Guide button.  Any ideas on if your fix would be added to it eventually?  Thanks in advance.
Reply
#11
(2024-01-16, 01:44)Clutz450 Wrote: I've only ever used the main version of Kodi from their website and was wondering what is the major difference between your version and the official one?

You can find my builds at https://github.com/garbear/xbmc/releases. The release notes list pretty extensively the differences.

Basically I created these builds for myself based on a vanilla version of Kodi plus all the game features I upstream to v21, so that I can benefit from the changes while staying on the stable v20. As long as I'm doing builds for myself, I figured I'd share them for others that want a (slightly) better games experience out of the box.

(2024-01-16, 01:44)Clutz450 Wrote: I ask because I thought RetroPlayer was already in (or could be added to) the main version of Kodi.

Correct, RetroPlayer was merged in v18.

The only difference in my builds are that, when I do a feature that goes into v21, I backport it to v20 and release it as a build. You can use v21 and get pretty much the same experience as my v20 builds, although a less stable beta version of Kodi.

(2024-01-16, 01:44)Clutz450 Wrote: I noticed that the main version of Kodi was recently updated to 20.3 but I didn't see anything in their changelog as adding the use of the XBOX button as the Guide button.  Any ideas on if your fix would be added to it eventually?

Because the Guide button caused problems before, and v20 is stable, I didn't backport the fix to v20. However, it's in v21, so it's also in my v20 RetroPlayer builds.
Reply
#12
Thank you for your explanation.  I think I understand now.  I guess I'll give your version a try until the official Kodi v21 comes out.  With that being said, is there anything in particular that needs testing in your build that I could be on the lookout for?  I do use a retro game launcher addon but I use its external launcher feature to launch the games with RetroArch.  From my understanding, RetroPlayer uses the same Libretro cores (that is about the extent of what I know about the technical side of RetroArch and RetroPlayer, lol).  After I download your version I could set the addon back up using RetroPlayer and if I see anything weird, I can let you know.  Do you have a discord or a main place where you and your users chat about your version?  Thanks.
Reply
#13
The main new feature I'm working on is the Player Manager, which lets you choose players and controllers in the UI. For v21, I'm merging the plumbing and framework along with a simple window that I call the Player Viewer (as the management part isn't done yet). Any testing of the new Player Viewer would be appreciated! You'll notice in my newest builds I added keyboard and mouse support to the new window.

You can find my builds at https://github.com/garbear/xbmc/releases , and I just published a new round of builds today.
Reply

Logout Mark Read Team Forum Stats Members Help
Guide button on game controller on Windows 100
This forum uses Lukasz Tkacz MyBB addons.