Skip to content

Conversation

@ruffsl
Copy link
Owner

@ruffsl ruffsl commented Jan 5, 2026

Screencast_20260108_173024.webm

Related:

ruffsl added 17 commits January 4, 2026 12:57
- Store formatted tag string in a variable to extend its lifetime, fixing E0716.
- Prefix unused variable with underscore to silence warning.
- Added `operation_mode` field to `TrayConfig` to track current mode (Mux or Demux).
- Refactored `TrayState` to include separate states for Mux and Demux operations.
- Updated methods to validate and retrieve primary and assist controller names based on the current operation mode.
- Enhanced documentation for clarity on controller selection and configuration.
@ruffsl ruffsl requested a review from Copilot January 5, 2026 03:57
@ruffsl ruffsl changed the title feat: add demux subcommand and multi operation config for system stray app feat: add demux subcommand and operation config for system tray Jan 5, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds demultiplexing (demux) functionality to CtrlAssist, enabling one controller to control multiple virtual gamepads. The tray application has been refactored to support both multiplexing (mux) and demultiplexing (demux) operations with independent configurations.

Key changes:

  • Added demux subcommand with unicast and multicast routing modes
  • Refactored tray state to separate mux-specific and demux-specific configurations
  • Implemented runtime-switchable operation modes (Mux/Demux) in the system tray

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
src/tray/state.rs Refactored state to support both Mux and Demux operations with separate MuxState and DemuxState structures
src/tray/config.rs Split configuration into nested MuxConfig and DemuxConfig structures with operation mode selection
src/tray/app.rs Updated tray menu to support operation mode switching and mode-specific configuration menus
src/main.rs Added Demux CLI subcommand with arguments for primary controller, sinks count, mode, hide, spoof, and rumble
src/mux_manager.rs Added tag parameter to virtual gamepad creation for device identification
src/evdev_helpers.rs Added tag support to virtual device naming and neutral gamepad event generation utility
src/demux_runtime.rs Implemented demux runtime with input/FF loops and DemuxRumbleTarget enum
src/demux_modes/mod.rs Defined DemuxModeType enum and DemuxMode trait for routing implementations
src/demux_modes/unicast.rs Implemented unicast mode routing primary to active virtual gamepad with Mode button cycling
src/demux_modes/multicast.rs Implemented multicast mode broadcasting primary input to all virtual gamepads
src/demux_modes/helpers.rs Re-exported shared helpers from mux_modes
src/demux_manager.rs Implemented demux session management with multiple virtual device and FF thread handling
README.md Added documentation for demux modes, CLI usage, and configuration examples

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…andles

- Move ScopedDeviceHider into MuxHandle and DemuxHandle to ensure device hiding persists for the session lifetime.
- Suppress dead_code linter warnings for hider fields, as they are intentionally unused but required for correct behavior.
@ruffsl ruffsl merged commit 0d99941 into main Jan 10, 2026
1 check passed
@ruffsl ruffsl deleted the demux branch January 10, 2026 05:57
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.

2 participants