Repository navigation
feat: opt-in two-player mode (a detector per player) - #30
Merged
Merged
Conversation
This was referenced Jun 29, 2026
Add an opt-in 'Enable debug logging' toggle (Advanced features, off by default) that surfaces diagnostics without code edits: - DrawDock: in debug mode, log the exact backend launch to the dock (resolved deck paths, channel, model, confidence, screen-time thresholds) and stop filtering the backend's stdout (show every line). - draw.c: in debug mode, log the resolved capture config to the OBS log (input source, source dimensions, crop, 180° rotation, channel). - feature_flags: FEATURE_DEBUG key. - SettingsDialog: the toggle. README + all translations document it. Plugin-side only; default (off) behaviour is unchanged.
leiteszeke
force-pushed
the
up/05-multiplayer
branch
from
October 11, 2026 14:05
133e911 to
240c71a
Compare
Three opt-in per-source detector-input aids (off by default), so the
plugin behaves like upstream until enabled:
- feature_flags.{h,cpp}: opt-in toggle infrastructure (draw_feature_enabled,
backed by QSettings) with FEATURE_CROP / FEATURE_ROTATE.
- draw.c: when enabled, the DRAW source gains Crop (L/T/R/B px) and a 180°
rotation, applied to the captured frame before the detector; plus a
'Preview detector input' toggle that renders the cropped/rotated frame in
the source itself (so the crop can be dialed in from the source's own
preview) instead of the detected-card overlay. Detection keeps running.
- SettingsDialog: 'Enable detector input crop' / 'Enable 180° input rotation'
toggles under 'Advanced features'.
- README + all translations and fr/ja locale strings.
Default (off) behaviour is identical to upstream.
Add an opt-in 'Enable debug logging' toggle (Advanced features, off by default) that surfaces diagnostics without code edits: - DrawDock: in debug mode, log the exact backend launch to the dock (resolved deck paths, channel, model, confidence, screen-time thresholds) and stop filtering the backend's stdout (show every line). - draw.c: in debug mode, log the resolved capture config to the OBS log (input source, source dimensions, crop, 180° rotation, channel). - feature_flags: FEATURE_DEBUG key. - SettingsDialog: the toggle. README + all translations document it. Plugin-side only; default (off) behaviour is unchanged.
…-debug-mode # Conflicts: # data/locale/en-US.ini # data/locale/fr-FR.ini # data/locale/ja-JP.ini # src/SettingsDialog.cpp # src/SettingsDialog.hpp # src/bridge.h
- draw.c: the debug log still printed rotate_180, which no longer exists (build error); log crop + channel only. - en-US.ini: restore the crop/preview labels from HichTala#28 that the master merge reverted. - README_jp.md: remove the duplicated Advanced features block. - READMEs: debug log details mention crop only (no rotation). - DrawDock.cpp: include bridge.h. - clang-format.
Run a detector per player so two players can be processed at once. Opt-in (off by default) via the 'Enable two players' toggle; single-player setups are unchanged. Stacks on the crop + debug features. - bridge: FEATURE_CHANNEL key (alongside CROP/DEBUG). - DrawDock: launch a second backend (player 2) only when enabled; dock log lines are tagged [P1]/[P2]. - SettingsDialog: 'Enable two players' toggle under Advanced features; the Player 2 deck-list row appears only when enabled. - draw.c: a 'Detector / Player' property on the DRAW source selects which detector (shared-memory channel) it reads from. - README + all translations document the two-player workflow. Default (off) behaviour is identical to single-player.
leiteszeke
force-pushed
the
up/05-multiplayer
branch
from
October 13, 2026 10:56
240c71a to
3f809be
Compare
HichTala
approved these changes
Oct 13, 2026
HichTala
left a comment
Owner
There was a problem hiding this comment.
All good, still need to perform some tests on windows before merging it
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.
Summary
Adds an opt-in "Enable two players" toggle (Draw 2 settings → Advanced features, off by default): the dock runs one detector per player, each with its own deck lists, and each
Draw Displaysource picks which detector it reads from. Single-player setups are unaffected.Changes
src/feature_flags.{h,cpp}—FEATURE_CHANNELkey (alongside the existing crop/rotate/debug flags).src/DrawDock.{cpp,hpp}— when enabled, launch a second backend (player 2); dock log lines are tagged[P1]/[P2]. Off → a single detector, as before.src/SettingsDialog.{cpp,hpp}— the Enable two players toggle, and a Player 2 deck-list row shown only when it's on.src/draw.c— when enabled, aDetector / Playerproperty on theDraw Displaysource selects which detector (shared-memory channel) it reads from; changing it re-creates the shared memory under the new channel.es/fr/jp/pt-br) document it under a single Advanced features section.Opt-in / default behaviour
Off by default: with it off, the source has no channel selector, no Player 2 deck row, and the dock launches a single detector — identical to single-player.
How it was tested
cmake --preset macos).Detector / Playerproperty, and Start DRAW launches two detectors ([P1]+[P2]).Screenshots
Toggle off (default) → only Player 1 decks vs toggle on → Player 1 + Player 2 decks:
Per-source
Detector / Playerselector (eachDraw Displaychooses which detector it reads from):Two detectors live — both backends running (
[P1]+[P2]in the dock log), each player's card detected independently: