[PR #384] [CLOSED] Replace existing controller on re-arrival instead of skipping #435

Closed
opened 2026-10-15 13:00:33 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/wolf/pull/384
Author: @kmreisi
Created: 4/5/2026
Status: ❌ Closed

Base: stable ← Head: fix/reconnect-replace-controller


📝 Commits (1)

  • 462ee49 Replace existing controller on re-arrival instead of skipping

📊 Changes

1 file changed (+19 additions, -11 deletions)

View changed files

📝 src/moonlight-server/control/input_handler.cpp (+19 -11)

📄 Description

Summary

When a Moonlight client reconnects, it sends CONTROLLER_ARRIVAL for controllers that may already exist in the session (carried over via resume). Previously this was skipped with a TODO comment, leaving stale virtual devices in the container.

Now the old pad is unplugged (UnplugDeviceEvent) and removed from the joypads list before creating a fresh one, ensuring the container always has exactly one device per controller after reconnect.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/games-on-whales/wolf/pull/384 **Author:** [@kmreisi](https://github.com/kmreisi) **Created:** 4/5/2026 **Status:** ❌ Closed **Base:** `stable` ← **Head:** `fix/reconnect-replace-controller` --- ### 📝 Commits (1) - [`462ee49`](https://github.com/games-on-whales/wolf/commit/462ee4960987df93913540ade683694771a6964f) Replace existing controller on re-arrival instead of skipping ### 📊 Changes **1 file changed** (+19 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `src/moonlight-server/control/input_handler.cpp` (+19 -11) </details> ### 📄 Description ## Summary When a Moonlight client reconnects, it sends CONTROLLER_ARRIVAL for controllers that may already exist in the session (carried over via resume). Previously this was skipped with a TODO comment, leaving stale virtual devices in the container. Now the old pad is unplugged (UnplugDeviceEvent) and removed from the joypads list before creating a fresh one, ensuring the container always has exactly one device per controller after reconnect. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 13:00:33 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/wolf#435
No description provided.