From 42e4e0bd5693736060f8e018f08eb4eeab02e9c3 Mon Sep 17 00:00:00 2001 From: Michael Wilson Date: Mon, 17 Aug 2026 19:16:39 -0500 Subject: [PATCH 1/2] fix: decode the XInput Guide button bit in decodeXInput360 Byte 3 bit 0x04 of the Xbox 360 wired report is the standard Guide/Xbox button bit, but decodeXInput360 never read it, so every XINPUT_360-family pad (including the Amazon Luna Controller) silently dropped a center-button press instead of reporting it as Guide. Confirmed the Luna's center button sets exactly this bit via a live raw-report capture on device. Co-Authored-By: Claude Sonnet 5 --- app/src/main/cpp/usb_parsers.cpp | 1 + app/src/test/cpp/usb_parsers_test.cpp | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/app/src/main/cpp/usb_parsers.cpp b/app/src/main/cpp/usb_parsers.cpp index e843119a..7b12237d 100644 --- a/app/src/main/cpp/usb_parsers.cpp +++ b/app/src/main/cpp/usb_parsers.cpp @@ -720,6 +720,7 @@ bool decodeXInput360(const uint8_t* buf, size_t len, DeviceState& s) { if (buf[2] & 0x80) b |= XUSB_THUMB_R; if (buf[3] & 0x01) b |= XUSB_LB; if (buf[3] & 0x02) b |= XUSB_RB; + if (buf[3] & 0x04) b |= XUSB_GUIDE; if (buf[3] & 0x10) b |= XUSB_A; if (buf[3] & 0x20) b |= XUSB_B; if (buf[3] & 0x40) b |= XUSB_X; diff --git a/app/src/test/cpp/usb_parsers_test.cpp b/app/src/test/cpp/usb_parsers_test.cpp index 757430d1..1afe463a 100644 --- a/app/src/test/cpp/usb_parsers_test.cpp +++ b/app/src/test/cpp/usb_parsers_test.cpp @@ -418,6 +418,16 @@ TEST(Decode, Xbox360WirelessDecodesLikeWired) { EXPECT_EQ(wired.sLX, wireless.sLX); } +TEST(Decode, Xbox360WiredGuideButtonSetsGuideBit) { + std::vector r(14, 0); + r[0] = 0x00; + r[3] = 0x04; // Guide (same bit the Amazon Luna Controller's center button reports) + DeviceState s; + ParserState p; + ASSERT_TRUE(decodeReport(Parser::XINPUT_360, r.data(), r.size(), s, &p)); + EXPECT_TRUE(s.wButtons & XUSB_GUIDE); +} + TEST(Rumble, Xbox360WirelessWrapsFrame) { uint8_t out[64]; size_t n = buildRumbleReport(Parser::XINPUT_360_WIRELESS, 0xFF00, 0x8000, 7, out, sizeof(out)); From cd47e31f4ac1c2cb4eb7e18c3771e57ebf35cbd0 Mon Sep 17 00:00:00 2001 From: Michael Wilson Date: Mon, 17 Aug 2026 19:23:40 -0500 Subject: [PATCH 2/2] docs: note the Guide-button decode fix in CHANGELOG Co-Authored-By: Claude Sonnet 5 --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fd4ddd9..b79928f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,16 @@ computer. Those lines say "update Satellite too". --- +## [Unreleased] + +### Fixed + +- The Xbox/Guide button on XInput-style wired USB controllers (Xbox 360 + and its many licensed clones, plus the Amazon Luna Controller) now + works. Before this fix, pressing it did nothing. + +--- + ## [1.1.1] - 2026-08-17 ### Fixed