Skip to content

give a second gamepad a seat of its own - #2676

Draft
benklop wants to merge 2 commits into
Moonfin-Client:mainfrom
benklop:feat/romm-stream-gamepads
Draft

benklop wants to merge 2 commits into
Moonfin-Client:mainfrom
benklop:feat/romm-stream-gamepads

Conversation

@benklop

@benklop benklop commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A controller seat starts with one gamepad slot, and the station drops input for any other slot, so a second pad drove nothing. The client now asks the room for a slot per pad, with the same assign_slot frame the room page sends when the host drags a gamepad onto a person; the station's role update re-maps the lanes. The room client exposes the roster and assign/release calls that the start-menu player assignment will use later.

Stacked on #2673.

Written with AI assistance; the room protocol was exercised against the live station.

Related Issues

No linked issue.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Performance improvement
  • UI/UX update
  • Documentation update
  • Build/CI change
  • Other (describe):

Changes Made

  • Room client: roster of members and their slots, assign_slot/release_slot, cached widening of the stream's own seat, reconnect-safe state reads.
  • Input lane reports the pad count and re-maps lanes after the station's role update.
  • Tests against a local WebSocket station.

Platform

  • Android
  • Android TV
  • iOS
  • tvOS
  • Web
  • macOS
  • Windows
  • Linux
  • All / Shared code

Testing

  • Tested on emulator / simulator
  • Tested on physical device
  • Manual testing completed
  • Not tested (explain why):

Test Steps

  1. Against the live station, assigned and released slot 2 from the room socket and watched the app's grants line follow [0] → [0, 1] → [0].
  2. flutter test test/util/game_stream/ passes (85 tests).
  3. End-to-end two-player play still needs a seat granted two slots (broker 0.16+); the client side and the grant path are ready.

Screenshots (if applicable)

None.

Checklist

  • Code builds successfully
  • Code follows project style and conventions
  • No unnecessary commented-out code
  • No new warnings introduced

@coderabbitai

coderabbitai Bot commented Dec 5, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions github-actions Bot added the Missing Template Issue opened without one of the issue forms label Dec 5, 2026
The session speaks Selkies' signaling and wire protocol over a WebRTC peer connection, so the station's video and audio play natively with no WebView in the path. Keys, pads and the pointer ride the server's data channels; Android forwards only classified pads' keys and motion to the plugin while a stream runs, leaving the remote on the router's label path. The stream keeps its sound on the device even with a headset paired, binds video by track id rather than by stream, and shows a spinner while it starts instead of trace text over the game.
A controller seat starts with one gamepad slot and the station drops input for any other, so a second pad drove nothing. The app now asks the room for a slot per pad, with the same assign_slot frame the room page sends when the host drags a gamepad onto a person, and the station's role update re-maps the lanes. The room client exposes the roster and the assign/release calls the start-menu player assignment will use.
@benklop
benklop force-pushed the feat/romm-stream-gamepads branch from ccb8f4b to 1cb589e Compare December 5, 2026 04:46
@RadicalMuffinMan RadicalMuffinMan added All Feature Request New feature or request and removed Missing Template Issue opened without one of the issue forms labels Dec 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

All Feature Request New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants