Repository navigation
Gamepads: keep the capture and Guide buttons of a controller assigned to another session out of the console - #72
Open
mlopezsegura wants to merge 2 commits into
Open
mlopezsegura wants to merge 2 commits into
mlopezsegura wants to merge 2 commits into
Conversation
…tra sesión Algunos mandos (GameSir, 8BitDo...) traen en el mismo USB una interfaz de teclado: el botón de captura manda teclas por ahí. Windows lleva los teclados físicos a la consola desde el kernel, donde HidHide no llega, así que con el mando asignado a otra sesión la captura saltaba en la consola. Mientras el mando va a otra sesión, esa interfaz pasa a WinUSB con UsbCapture (con su registro en disco) y vuelve a su driver cuando el mando vuelve a la consola. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GuideButtonGuard solo se activaba con puestos encendidos. Con un mando físico asignado a una sesión de stream, el botón Guía seguía abriendo la Game Bar en la consola (Windows lo lee desde un servicio del sistema, fuera de HidHide). Ahora se apaga para el usuario de esa sesión y el de la consola mientras dure la asignación. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With a physical controller assigned to a stream session (or a seat), its capture and Guide buttons still acted on the console session.
Capture button. Some controllers (GameSir, 8BitDo…) expose a HID keyboard on another interface of the same USB device and the capture button sends keystrokes through it. Seen with a GameSir in Xbox 360 mode (
VID_3537&PID_1040):MI_00is the XUSB pad,MI_01a keyboard + consumer control. Isolation only jailed the pad node and its descendants in HidHide, and Windows routes physical keyboards to the console from the kernel, where HidHide doesn't reach.GamepadSessionIsolation.SyncSideInputs: while a physical pad goes to a session other than the console, the keyboard/mouse interfaces of its USB device (UsbCapture.FindTargets) are switched to WinUSB withUsbCapture, which journals the change so a crash is undone on the next start. They go back to their driver when the pad returns to the console, and when the service stops. Interfaces a seat already captured are left alone (UsbCapture.IsCaptured).Guide button. Windows reads it from a system service, outside HidHide, and opens the Game Bar in every session.
GuideButtonGuard(UseNexusForGameBarEnabled = 0) was only engaged by running seats.GamepadSessionIsolation.SyncGuideButtonengages it too while a physical pad is assigned to a stream session, for that session's user and the console user, and releases it when the assignment ends or the service stops. It's reference-counted, so it coexists with seats.Builds; 117 tests pass. Not yet tested on hardware.
🤖 Generated with Claude Code