Skip to content

Comments

feat: add Active as default for MuxRumbleTarget enum#50

Merged
ruffsl merged 28 commits intomainfrom
active-ff-mux
Jan 13, 2026
Merged

feat: add Active as default for MuxRumbleTarget enum#50
ruffsl merged 28 commits intomainfrom
active-ff-mux

Conversation

@ruffsl
Copy link
Owner

@ruffsl ruffsl commented Jan 13, 2026

No description provided.

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 PR adds the Active rumble target as the default for the MuxRumbleTarget enum, enabling dynamic force feedback routing based on currently active controllers in toggle mode. The PR also includes several related improvements to signal handling, file locking, and dependency management.

Changes:

  • Introduces MuxRumbleTarget::Active enum variant with active controller tracking for dynamic force feedback routing
  • Replaces ctrlc with signal-hook to support both SIGINT and SIGTERM signals
  • Adds file locking with fs2 for Steam config file modifications to prevent race conditions
  • Updates dependencies (gilrs, ashpd, clap, libc, log, toml)

Reviewed changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/mux/mod.rs Defines new MuxRumbleTarget enum with Active as default
src/mux/runtime.rs Implements active controller tracking with generation-based FF rebuild system
src/mux/modes/mod.rs Adds MuxOutput struct and initial_active_controllers trait method
src/mux/modes/toggle.rs Updates toggle mode to report active controller changes
src/mux/modes/priority.rs Updates priority mode to use new MuxOutput structure
src/mux/modes/average.rs Updates average mode to use new MuxOutput structure
src/mux/manager.rs Updates manager to pass IDs to RuntimeSettings initialization
src/demux/mod.rs Moves DemuxRumbleTarget enum from runtime.rs to mod.rs
src/demux/runtime.rs Removes DemuxRumbleTarget enum definition
src/demux/manager.rs Updates import for DemuxRumbleTarget
src/utils/hide.rs Adds file locking for Steam config modifications
src/tray/mod.rs Replaces tokio::signal::ctrl_c with unix signal handlers
src/tray/app.rs Adds Active variant to rumble menu and updates mode change handler
src/tray/config.rs Updates types to use module-specific rumble enums
src/tray/state.rs Updates types to use module-specific rumble enums
src/main.rs Replaces ctrlc with signal-hook for SIGINT/SIGTERM handling
README.md Adds cookbook section with examples and fixes grammar
Cargo.toml Updates dependencies and removes ctrlc
Cargo.lock Reflects dependency updates
flatpak/cargo-sources.json Updates flatpak dependency sources
.vscode/settings.json Adds spelling entries

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

ruffsl and others added 6 commits January 12, 2026 22:51
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Refactored run_input_loop and RuntimeSettings::update_mode to eliminate double creation of mux mode instances when switching modes. Now, the mode instance is created once, used to obtain default active controllers, and passed to update_mode, improving efficiency and clarity.
@ruffsl ruffsl marked this pull request as ready for review January 13, 2026 05:46
@ruffsl ruffsl merged commit 64a906e into main Jan 13, 2026
1 check passed
@ruffsl ruffsl deleted the active-ff-mux branch January 13, 2026 22:11
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