Skip to content

feat(windows): add user-mode Xbox 360 XInput support - #139

Merged
ReenigneArcher merged 6 commits into
masterfrom
fix/xbox360
Sep 12, 2026
Merged

feat(windows): add user-mode Xbox 360 XInput support#139
ReenigneArcher merged 6 commits into
masterfrom
fix/xbox360

Conversation

@ReenigneArcher

@ReenigneArcher ReenigneArcher commented Sep 11, 2026

Copy link
Copy Markdown
Member

Description

Create broker-owned Xbox 360 software devices backed by a dedicated UMDF2
XUSB companion, with a correlated VHF child for HID and DirectInput
compatibility.

Route token-authenticated XUSB state and rumble through the Windows backend.
Extend the INF and driver package for client and server Windows SKUs, harden
device teardown, and add installed-driver lifecycle coverage.

Advance the private broker and control protocols to version 5 for the new
per-device transport. The public C++ API and existing xbox_360 profile remain
unchanged, but applications must use a matching library, broker, and driver
package.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

See our AI usage policy.

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.33962% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.94%. Comparing base (a54cc91) to head (ca11977).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/platform/windows/windows_backend.cpp 92.43% 8 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #139      +/-   ##
==========================================
+ Coverage   73.56%   73.94%   +0.38%     
==========================================
  Files          34       34              
  Lines        9317     9470     +153     
  Branches     3480     3536      +56     
==========================================
+ Hits         6854     7003     +149     
- Misses       1799     2136     +337     
+ Partials      664      331     -333     
Flag Coverage Δ
FreeBSD 52.49% <100.00%> (+0.45%) ⬆️
Linux-Clang 55.38% <100.00%> (+0.25%) ⬆️
Linux-GCC 66.13% <100.00%> (+0.20%) ⬆️
Windows-MSVC 88.75% <94.85%> (+0.28%) ⬆️
Windows-MinGW-UCRT64 63.61% <85.50%> (+0.48%) ⬆️
macOS 49.13% <100.00%> (+0.46%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/platform/windows/control_protocol.hpp 97.73% <100.00%> (+0.49%) ⬆️
src/platform/windows/windows_backend.cpp 84.12% <92.43%> (+0.64%) ⬆️

... and 10 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a54cc91...ca11977. Read the comment docs.

@ReenigneArcher
ReenigneArcher force-pushed the fix/xbox360 branch 2 times, most recently from 834f2aa to 457b3f5 Compare September 12, 2026 00:39
@ReenigneArcher ReenigneArcher changed the title feat(windows): add user-mode Xbox 360 gamepads feat(windows): add user-mode Xbox 360 XInput support Sep 12, 2026
Create broker-owned software devices backed by a dedicated UMDF2 XUSB companion while retaining a correlated VHF HID child for DirectInput compatibility.

Route token-authenticated native XInput state and rumble through the Windows backend, extend the driver package and wire protocols, and add installed-consumer coverage and documentation for the XUSB compatibility boundary.
Use ROOT-style PnP hardware IDs for SwDevice-created Xbox 360 instances so the INF selects the companion driver and publishes XUSB. Include Configuration Manager status in interface startup failures.
Use bare hardware IDs for SwDevice-created Xbox 360 companions and add matching INF model entries so PnP installs the UMDF driver instead of leaving a Code 1 devnode.

Preserve the ROOT provisioning alias and align installed-driver validation and documentation with the software-device identity.
Match the default first-reported Xbox 360 VID/PID identity in both Windows model sections so PnP selects the UMDF package at rank zero instead of relying on the lower-ranked generic fallback.

Exercise the x360 profile during installed-driver smoke validation and document the ranked default and custom-identity fallback behavior.
Skip the HID child assertion for the native Xbox 360 profile and verify its software-device XUSB companion directly. This allows installed-package smoke testing to exercise the intended Windows device path.
Select server-specific INF models that omit the client-only xinputhid classifier while preserving the XUSB interface and VHF child. Let WDF tear down device-owned queues so cleanup cannot terminate the UMDF host on a failed synchronous purge.
@sonarqubecloud

Copy link
Copy Markdown

@ReenigneArcher
ReenigneArcher merged commit f0e2a30 into master Sep 12, 2026
32 checks passed
@ReenigneArcher
ReenigneArcher deleted the fix/xbox360 branch September 12, 2026 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant