feat(input): Nintendo's GameCube controller adapter over WinUSB, read by the builder #3245

Merged
HumanBean merged 5 commits from llun/Longshot:feat/gamecube-adapter into main 2026-12-05 17:09:43 +00:00
Member

Summary

A player with Nintendo's official GameCube controller adapter (WUP-028, the Wii U / Switch one) found that it did
nothing in Longshot, even after switching it to WinUSB with Zadig. The reason: SDL reads that adapter only through
libusb, and the SDL3 Longshot ships (libsdl's own Windows release) is built without it. So SDL's Windows HID path
skips the adapter on purpose (SDL_libusb_required in SDL's src/hidapi/SDL_hidapi.c). With Zadig it isn't a HID
device at all, and without Zadig SDL skips it.

This PR has the builder read the adapter itself, the way it already reads the Switch 2 Pro Controller
(build_core::switch2):

  • Found on WinUSB, the driver Zadig installs (Dolphin asks for the same one). The builder reads the adapter's
    interface class from the device's DeviceInterfaceGUIDs registry value, the way libusb's WinUSB backend finds a
    device.
  • Started as SDL's and Dolphin's drivers start it: SET_PROTOCOL 1, then 0x13. Its 37-byte reports are read on
    one thread.
  • One pad per controller. Each controller in its four ports becomes a virtual gamepad in the builder's SDL3,
    "Nintendo GameCube Controller", with no motion, so it reaches the game as any of the builder's pads. The button
    prompts are the Switch's (its name has "Nintendo").
  • Buttons keep Nintendo's names. A is the game's A, B its B, X its X, Y its Y, Start is Plus, Z is R, and the
    analog L and R triggers are ZL and ZR. The control stick is the left stick and the C-stick the right. The axis
    ranges widen as the sticks move, as in SDL's driver. The controller has no L or Minus: the Controls page binds
    those to something else.
  • Rumble on a wired controller when the adapter's grey plug is in.
  • An adapter still on Windows' own driver gets a log line saying how to switch it with Zadig. The driver's
    gamecube: lines go to the builder's standard error, like the control channel's lines, so in play they are in the
    game's longshot_log.txt.
  • HOS_GAMECUBE=0 (a kill switch, on by default) leaves the adapter to another program, such as Dolphin or
    Delfinovin. Only one program can have it. The builder's drivers now also take their switches from the environment the
    game inherits (control::pad_switches_of), not only from the command's own changes; that fixes HOS_SWITCH2 set
    that way too.

Also: switch2.rs's WinUSB lookup moves to a new winusb.rs that takes the device's ids, so both drivers share it
(the Switch 2 Pro's strings are unchanged). Sdl::virtual_pad takes whether the pad has motion. Docs:
docs/user/graphics-and-controls.md (how to set the adapter up), docs/dev/reference/input.md,
docs/dev/reference/sandbox.md.

Read first: builder/crates/build-core/src/gamecube.rs (protocol on top, the Windows part in mod os), then
winusb.rs.

Testing

Tested: Windows 11, NVIDIA RTX 5080 (driver 621.47), with no adapter plugged in: a smoke run of this checkout's
runtime over the shared base (mise run dev -- smoke). It reached play from kokiri-start, 900 frames, the Insert menu
opened, PASS. The builder still serves the pads (hid: controller support through the builder), and the game's log
has gamecube: looking for a GameCube controller adapter on WinUSB (HOS_GAMECUBE=0 leaves it alone). Run again after
the review fixes (22dbbc40f): PASS, the same line.

Checks: cargo test -p build-core (gamecube, winusb, switch2, pads, control): 33 passed, 9 of them new. They cover
the adapter's report on recorded bytes (four ports, wired, WaveBird, the power bit), the button names, the stick and
trigger axes (y turned, the range widening), the rumble report, the switch, the WinUSB lookup's device names and GUID
parsing, and the drivers' switches taken as the game inherits them (set, removed, inherited). rustfmt clean. mise run test -- --changed: 79 passed, 0 failed, 8 skipped (Linux-only).
Clippy (-D warnings) on build-core: clean but for unused import: note_lines (sandbox_windows.rs:384), which
fails on main too.

A player's official adapter on WinUSB, through the Launcher's build of dc66d624e: the controller connected (hid: controller "Nintendo GameCube Controller" connected (SDL in the builder)), but input came through only now and then, late, and one controller did not work until replugged. Likely cause, fixed in 338bbafae: 64-byte reads of 37-byte reports, out of line after the first. The same player's run of the Launcher build with that fix (338bbafae): "works perfect": the controller's input comes through with no delay.

Still to test:

  • Windows, the player's official adapter again (the basic run passed with 338bbafae): more than one controller, a
    WaveBird if they have one, rumble with the grey plug, and plugging controllers in and out while playing; expecting
    gamecube: port 1: a wired controller and
    hid: controller "Nintendo GameCube Controller" connected (SDL in the builder) in longshot_log.txt, the buttons,
    sticks and triggers as Summary says, rumble with the grey plug in, and controllers coming and going while playing
    (by hand: a tester lined up).
  • Windows, the same adapter still on Windows' own driver (no Zadig): expecting the log's Zadig line, no crash and no
    pad (by hand).
  • Windows, Dolphin open with the adapter (expecting gamecube: ... another program has it in the log), and again
    after HOS_GAMECUBE=0, set in longshot_env.txt and in the environment: the builder leaves it to Dolphin (by hand).
  • Windows, a Switch 2 Pro Controller on USB: still found and read after its lookup moved to winusb.rs (by hand:
    someone with one).

Note: the switch2: and pads: lines (already on main) still go through tracing, which longshot-builder's console
filter drops in play; that is fixed apart, in its own pull request.

Measurements

Nothing to measure: the game process is unchanged; the builder gains one thread that looks for the adapter every 2 s (one device lookup, as the Switch 2 driver already does) and, with an adapter, reads its reports (about 125 a second).

Risks

  • A PC with the adapter on WinUSB: the builder now takes the adapter at start, so Dolphin or Delfinovin running beside
    Longshot can't have it. HOS_GAMECUBE=0 turns this off; the builder's log names the busy case.
  • The Switch 2 Pro Controller's lookup moved files with the same strings; if it broke, that controller wouldn't be
    found (its Still to test line). A revert is enough.
  • Nothing changes for saves, settings or caches.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A switch added or changed: it ships at the default the measurements chose, with its row in gpu/vk/switches.def.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

## Summary A player with Nintendo's official GameCube controller adapter (WUP-028, the Wii U / Switch one) found that it did nothing in Longshot, even after switching it to WinUSB with Zadig. The reason: SDL reads that adapter only through libusb, and the SDL3 Longshot ships (libsdl's own Windows release) is built without it. So SDL's Windows HID path skips the adapter on purpose (`SDL_libusb_required` in SDL's `src/hidapi/SDL_hidapi.c`). With Zadig it isn't a HID device at all, and without Zadig SDL skips it. This PR has the builder read the adapter itself, the way it already reads the Switch 2 Pro Controller (`build_core::switch2`): - **Found on WinUSB**, the driver Zadig installs (Dolphin asks for the same one). The builder reads the adapter's interface class from the device's `DeviceInterfaceGUIDs` registry value, the way libusb's WinUSB backend finds a device. - **Started** as SDL's and Dolphin's drivers start it: SET_PROTOCOL 1, then `0x13`. Its 37-byte reports are read on one thread. - **One pad per controller.** Each controller in its four ports becomes a virtual gamepad in the builder's SDL3, "Nintendo GameCube Controller", with no motion, so it reaches the game as any of the builder's pads. The button prompts are the Switch's (its name has "Nintendo"). - **Buttons keep Nintendo's names.** A is the game's A, B its B, X its X, Y its Y, Start is Plus, Z is R, and the analog L and R triggers are ZL and ZR. The control stick is the left stick and the C-stick the right. The axis ranges widen as the sticks move, as in SDL's driver. The controller has no L or Minus: the Controls page binds those to something else. - **Rumble** on a wired controller when the adapter's grey plug is in. - **An adapter still on Windows' own driver** gets a log line saying how to switch it with Zadig. The driver's `gamecube:` lines go to the builder's standard error, like the control channel's lines, so in play they are in the game's `longshot_log.txt`. - **`HOS_GAMECUBE=0`** (a kill switch, on by default) leaves the adapter to another program, such as Dolphin or Delfinovin. Only one program can have it. The builder's drivers now also take their switches from the environment the game inherits (`control::pad_switches_of`), not only from the command's own changes; that fixes `HOS_SWITCH2` set that way too. Also: `switch2.rs`'s WinUSB lookup moves to a new `winusb.rs` that takes the device's ids, so both drivers share it (the Switch 2 Pro's strings are unchanged). `Sdl::virtual_pad` takes whether the pad has motion. Docs: `docs/user/graphics-and-controls.md` (how to set the adapter up), `docs/dev/reference/input.md`, `docs/dev/reference/sandbox.md`. Read first: `builder/crates/build-core/src/gamecube.rs` (protocol on top, the Windows part in `mod os`), then `winusb.rs`. ## Testing **Tested:** Windows 11, NVIDIA RTX 5080 (driver 621.47), with no adapter plugged in: a smoke run of this checkout's runtime over the shared base (`mise run dev -- smoke`). It reached play from kokiri-start, 900 frames, the Insert menu opened, PASS. The builder still serves the pads (`hid: controller support through the builder`), and the game's log has `gamecube: looking for a GameCube controller adapter on WinUSB (HOS_GAMECUBE=0 leaves it alone)`. Run again after the review fixes (22dbbc40f): PASS, the same line. Checks: `cargo test -p build-core` (gamecube, winusb, switch2, pads, control): 33 passed, 9 of them new. They cover the adapter's report on recorded bytes (four ports, wired, WaveBird, the power bit), the button names, the stick and trigger axes (y turned, the range widening), the rumble report, the switch, the WinUSB lookup's device names and GUID parsing, and the drivers' switches taken as the game inherits them (set, removed, inherited). rustfmt clean. `mise run test -- --changed`: 79 passed, 0 failed, 8 skipped (Linux-only). Clippy (`-D warnings`) on build-core: clean but for `unused import: note_lines` (`sandbox_windows.rs:384`), which fails on `main` too. A player's official adapter on WinUSB, through the Launcher's build of dc66d624e: the controller connected (`hid: controller "Nintendo GameCube Controller" connected (SDL in the builder)`), but input came through only now and then, late, and one controller did not work until replugged. Likely cause, fixed in 338bbafae: 64-byte reads of 37-byte reports, out of line after the first. The same player's run of the Launcher build with that fix (338bbafae): "works perfect": the controller's input comes through with no delay. **Still to test:** - Windows, the player's official adapter again (the basic run passed with 338bbafae): more than one controller, a WaveBird if they have one, rumble with the grey plug, and plugging controllers in and out while playing; expecting `gamecube: port 1: a wired controller` and `hid: controller "Nintendo GameCube Controller" connected (SDL in the builder)` in `longshot_log.txt`, the buttons, sticks and triggers as Summary says, rumble with the grey plug in, and controllers coming and going while playing (by hand: a tester lined up). - Windows, the same adapter still on Windows' own driver (no Zadig): expecting the log's Zadig line, no crash and no pad (by hand). - Windows, Dolphin open with the adapter (expecting `gamecube: ... another program has it` in the log), and again after `HOS_GAMECUBE=0`, set in `longshot_env.txt` and in the environment: the builder leaves it to Dolphin (by hand). - Windows, a Switch 2 Pro Controller on USB: still found and read after its lookup moved to `winusb.rs` (by hand: someone with one). Note: the `switch2:` and `pads:` lines (already on `main`) still go through tracing, which `longshot-builder`'s console filter drops in play; that is fixed apart, in its own pull request. ## Measurements Nothing to measure: the game process is unchanged; the builder gains one thread that looks for the adapter every 2 s (one device lookup, as the Switch 2 driver already does) and, with an adapter, reads its reports (about 125 a second). ## Risks - A PC with the adapter on WinUSB: the builder now takes the adapter at start, so Dolphin or Delfinovin running beside Longshot can't have it. `HOS_GAMECUBE=0` turns this off; the builder's log names the busy case. - The Switch 2 Pro Controller's lookup moved files with the same strings; if it broke, that controller wouldn't be found (its Still to test line). A revert is enough. - Nothing changes for saves, settings or caches. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A switch added or changed: it ships at the default the measurements chose, with its row in `gpu/vk/switches.def`. - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(input): Nintendo's GameCube controller adapter over WinUSB, read by the builder
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
4520f28001
The official GameCube controller adapter (WUP-028) did nothing in Longshot, even
after Zadig: SDL reads it only through libusb, which the SDL3 Longshot ships is
built without, so SDL's Windows HID path passes it over (SDL_libusb_required).

The builder now reads it itself, as it does the Switch 2 Pro Controller: found on
the WinUSB driver Zadig installs (its interface class from the device's
DeviceInterfaceGUIDs, as libusb's WinUSB backend finds it), started (SET_PROTOCOL,
then 0x13, as SDL's and Dolphin's drivers do), its 37-byte reports read, and each
controller in its four ports given to the builder's SDL3 as a virtual gamepad,
"Nintendo GameCube Controller", with no motion. The face buttons keep Nintendo's
names (A is the game's A), Start is Plus, Z is R, the analog triggers ZL and ZR;
a wired controller rumbles with the adapter's grey plug in. An adapter still on
Windows' own driver is named in the builder's log with what to do.

switch2.rs's WinUSB lookup moves to winusb.rs, taking the device's ids, so both
drivers use it; virtual_pad takes whether the pad has motion. HOS_GAMECUBE=0
leaves the adapter to another program (Dolphin, Delfinovin).

Assisted-by: Claude Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Tested in game: Windows 11, NVIDIA RTX 5080 (driver 621.47), no GameCube adapter on this PC: a smoke run of this checkout's runtime over the shared base reached play from kokiri-start, 900 frames, the Insert menu opened, PASS; the builder still serves the pads (hid: controller support through the builder). A run with the adapter itself is in Still to test: a tester with one will build this PR from the Launcher.

Tested in game: Windows 11, NVIDIA RTX 5080 (driver 621.47), no GameCube adapter on this PC: a smoke run of this checkout's runtime over the shared base reached play from kokiri-start, 900 frames, the Insert menu opened, PASS; the builder still serves the pads (hid: controller support through the builder). A run with the adapter itself is in Still to test: a tester with one will build this PR from the Launcher.
Author
Member

Measurements: one line saying why there is nothing to measure (the game process is unchanged).

Measurements: one line saying why there is nothing to measure (the game process is unchanged).
llun changed title from WIP: feat(input): Nintendo's GameCube controller adapter over WinUSB, read by the builder to feat(input): Nintendo's GameCube controller adapter over WinUSB, read by the builder 2026-12-05 12:11:41 +00:00
BeanBot requested changes 2026-12-05 12:13:46 +00:00
Dismissed
BeanBot left a comment

Recommendation: Request changes. The kill switch does not work when inherited from the environment, and the promised adapter diagnostics are filtered out during normal play. The adapter and the moved Switch 2 lookup also still need hardware runs.

Adds Windows support for Nintendo’s GameCube adapter through WinUSB and shares device discovery with the existing Switch 2 driver. It adds a polling thread and four possible virtual pads, but its hardware behavior is not yet demonstrated.

Blocking (2): must change before merging.

  1. L1 builder/crates/build-core/src/control.rs:48: The new kill switch is collected only from explicit Command overrides, so an inherited environment value is ignored by the builder’s driver. (more on the line) Do: Collect the effective game environment, including inherited values and explicit removals, and test the inherited and overridden switch cases.
  2. L3 builder/crates/build-core/src/gamecube.rs:167: The new Windows module permits unsafe code outside the locations allowed by the repository’s builder code rules; the new winusb.rs does the same. (more on the line) Do: Put the required unsafe system calls behind an allowed system-call boundary, or have the repository rule explicitly changed through the appropriate decision.

Should fix (1): not blocking, but worth doing before merging.

  • L2 builder/crates/build-core/src/gamecube.rs:244: The adapter setup and busy diagnostics use the build-core tracing target, which the builder’s normal console filter discards. (more on the line) Do: Route the actionable adapter diagnostics through a target or logging channel included in normal play, and update the sandbox instructions to name the actual destination.

Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)

  • L4 builder/crates/build-core/src/gamecube.rs:378: The new device path has not been exercised with the adapter it is meant to support. (more on the line) Do: Run the Launcher build on Windows with the official adapter on WinUSB: exercise all ports, controls, rumble, disconnect and reconnect, the Windows-driver case and the kill switch.
  • L5 builder/crates/build-core/src/switch2.rs:738: The shared lookup has not been exercised with the existing Switch 2 Pro Controller. (more on the line) Do: Run a Windows USB Switch 2 Pro Controller through connection, controls, motion, rumble and NFC after the lookup move.

@fix can do L1, L2 and L3.

Checks: Still running: 11 checks.

More: does it help, other systems, switches, what was read

Does it help: Unproven: the reported Windows smoke run had no adapter. The protocol unit tests exercise canned reports, but no run shows an adapter producing usable game input or rumble.

Other systems: The shared WinUSB lookup also serves the Windows Switch 2 Pro Controller; its USB input, motion, rumble and NFC path need a regression run. Linux does not compile the new Windows device module. The new thread runs in the builder alongside its SDL pad polling.

Switches: HOS_GAMECUBE is added, default on, with a row in switches.def. Its intended default enables the feature, but hardware behavior remains untested; an inherited HOS_GAMECUBE=0 currently does not reach the driver.

Reviewed: 4520f28001 against 7bc53f8413: Read the repository rules, PR template, standards, commit and diff; read the new GameCube and WinUSB code and the changed portions and relevant callers of control, pads, lib and switch2. Reviewed the changed documentation and switch row. The full large existing control, pads and switch2 files were skimmed outside the affected paths; Tooling’s AGENTS.md was unavailable, and docs/review-checklist.md does not exist.; nothing run (a code review).

Checked and fine:

  • The commit records AI assistance.
  • The diff contains no game files, generated output or third-party changes.
  • The virtual pad omits motion sensors for the GameCube controller and retains them for the Switch 2 controller.
  • The report parser checks the report length before indexing its four slots.

Testing: No code or tests were run during review. The author reports a Windows smoke run without the adapter and passing unit checks; CI is still running.

Overlaps and merge order: Not checked; network access is closed.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as llun took it out of WIP. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The kill switch does not work when inherited from the environment, and the promised adapter diagnostics are filtered out during normal play. The adapter and the moved Switch 2 lookup also still need hardware runs. Adds Windows support for Nintendo’s GameCube adapter through WinUSB and shares device discovery with the existing Switch 2 driver. It adds a polling thread and four possible virtual pads, but its hardware behavior is not yet demonstrated. **Blocking (2)**: must change before merging. 1. **L1** `builder/crates/build-core/src/control.rs:48`: The new kill switch is collected only from explicit Command overrides, so an inherited environment value is ignored by the builder’s driver. (more on the line) **Do:** Collect the effective game environment, including inherited values and explicit removals, and test the inherited and overridden switch cases. 2. **L3** `builder/crates/build-core/src/gamecube.rs:167`: The new Windows module permits unsafe code outside the locations allowed by the repository’s builder code rules; the new winusb.rs does the same. (more on the line) **Do:** Put the required unsafe system calls behind an allowed system-call boundary, or have the repository rule explicitly changed through the appropriate decision. **Should fix (1)**: not blocking, but worth doing before merging. - **L2** `builder/crates/build-core/src/gamecube.rs:244`: The adapter setup and busy diagnostics use the build-core tracing target, which the builder’s normal console filter discards. (more on the line) **Do:** Route the actionable adapter diagnostics through a target or logging channel included in normal play, and update the sandbox instructions to name the actual destination. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L4** `builder/crates/build-core/src/gamecube.rs:378`: The new device path has not been exercised with the adapter it is meant to support. (more on the line) **Do:** Run the Launcher build on Windows with the official adapter on WinUSB: exercise all ports, controls, rumble, disconnect and reconnect, the Windows-driver case and the kill switch. - **L5** `builder/crates/build-core/src/switch2.rs:738`: The shared lookup has not been exercised with the existing Switch 2 Pro Controller. (more on the line) **Do:** Run a Windows USB Switch 2 Pro Controller through connection, controls, motion, rumble and NFC after the lookup move. `@fix` can do L1, L2 and L3. **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven: the reported Windows smoke run had no adapter. The protocol unit tests exercise canned reports, but no run shows an adapter producing usable game input or rumble. **Other systems:** The shared WinUSB lookup also serves the Windows Switch 2 Pro Controller; its USB input, motion, rumble and NFC path need a regression run. Linux does not compile the new Windows device module. The new thread runs in the builder alongside its SDL pad polling. **Switches:** HOS_GAMECUBE is added, default on, with a row in switches.def. Its intended default enables the feature, but hardware behavior remains untested; an inherited HOS_GAMECUBE=0 currently does not reach the driver. **Reviewed:** 4520f2800138 against 7bc53f841323: Read the repository rules, PR template, standards, commit and diff; read the new GameCube and WinUSB code and the changed portions and relevant callers of control, pads, lib and switch2. Reviewed the changed documentation and switch row. The full large existing control, pads and switch2 files were skimmed outside the affected paths; Tooling’s AGENTS.md was unavailable, and docs/review-checklist.md does not exist.; nothing run (a code review). **Checked and fine:** - The commit records AI assistance. - The diff contains no game files, generated output or third-party changes. - The virtual pad omits motion sensors for the GameCube controller and retains them for the Switch 2 controller. - The report parser checks the report length before indexing its four slots. **Testing:** No code or tests were run during review. The author reports a Windows smoke run without the adapter and passing unit checks; CI is still running. **Overlaps and merge order:** Not checked; network access is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as llun took it out of WIP. Nothing was run; a maintainer decides.</sub>
@ -46,3 +45,4 @@
/// (its file of switches' among them, [`crate::game_env::apply`]).
#[must_use]
pub fn pad_switches(cmd: &std::process::Command) -> Vec<(String, String)> {
cmd.get_envs()
Member

L1 (blocking): The new kill switch is collected only from explicit Command overrides, so an inherited environment value is ignored by the builder’s driver.

When: When Longshot is started with HOS_GAMECUBE=0 in its environment and no game environment file overrides it, the game inherits that value, but pad_switches returns no entry and switched_on defaults to true. The builder can take the adapter from Dolphin despite the requested switch.

Do: Collect the effective game environment, including inherited values and explicit removals, and test the inherited and overridden switch cases.

**L1** (blocking): The new kill switch is collected only from explicit Command overrides, so an inherited environment value is ignored by the builder’s driver. *When:* When Longshot is started with HOS_GAMECUBE=0 in its environment and no game environment file overrides it, the game inherits that value, but pad_switches returns no entry and switched_on defaults to true. The builder can take the adapter from Dolphin despite the requested switch. **Do:** Collect the effective game environment, including inherited values and explicit removals, and test the inherited and overridden switch cases.
@ -0,0 +164,4 @@
/// The Windows device: the adapter found on WinUSB, its reports read and its rumble written on one thread, a virtual
/// pad in the builder's SDL3 for each controller plugged in.
#[cfg(windows)]
#[allow(unsafe_code)]
Member

L3 (blocking): The new Windows module permits unsafe code outside the locations allowed by the repository’s builder code rules; the new winusb.rs does the same.

When: Both modules introduce Windows FFI under new allow(unsafe_code) exemptions, while docs/dev/standards.md restricts builder unsafe code to the named system-call modules.

Do: Put the required unsafe system calls behind an allowed system-call boundary, or have the repository rule explicitly changed through the appropriate decision.

**L3** (blocking): The new Windows module permits unsafe code outside the locations allowed by the repository’s builder code rules; the new winusb.rs does the same. *When:* Both modules introduce Windows FFI under new allow(unsafe_code) exemptions, while docs/dev/standards.md restricts builder unsafe code to the named system-call modules. **Do:** Put the required unsafe system calls behind an allowed system-call boundary, or have the repository rule explicitly changed through the appropriate decision.
@ -0,0 +241,4 @@
let Some(class) = interface_class(super::VID, super::PID, None) else {
let hid = on_hid_driver();
if hid && !told.not_winusb {
tracing::info!(
Member

L2 (should fix): The adapter setup and busy diagnostics use the build-core tracing target, which the builder’s normal console filter discards.

When: A player plugs in the adapter on Windows’ own driver: on_hid_driver finds it and emits the Zadig instructions, but report::console::init accepts only longshot_builder and longshot::console, so the promised instruction never reaches the player.

Do: Route the actionable adapter diagnostics through a target or logging channel included in normal play, and update the sandbox instructions to name the actual destination.

**L2** (should fix): The adapter setup and busy diagnostics use the build-core tracing target, which the builder’s normal console filter discards. *When:* A player plugs in the adapter on Windows’ own driver: on_hid_driver finds it and emits the Zadig instructions, but report::console::init accepts only longshot_builder and longshot::console, so the promised instruction never reaches the player. **Do:** Route the actionable adapter diagnostics through a target or logging channel included in normal play, and update the sandbox instructions to name the actual destination.
@ -0,0 +375,4 @@
std::thread::sleep(std::time::Duration::from_millis(500));
}
}
Member

L4 (should fix): The new device path has not been exercised with the adapter it is meant to support.

When: The available game run had no adapter, so it cannot show that WinUSB discovery, report delivery, hotplug, controls and rumble work together on the official hardware.

Do: Run the Launcher build on Windows with the official adapter on WinUSB: exercise all ports, controls, rumble, disconnect and reconnect, the Windows-driver case and the kill switch.

**L4** (should fix): The new device path has not been exercised with the adapter it is meant to support. *When:* The available game run had no adapter, so it cannot show that WinUSB discovery, report delivery, hotplug, controls and rumble work together on the official hardware. **Do:** Run the Launcher build on Windows with the official adapter on WinUSB: exercise all ports, controls, rumble, disconnect and reconnect, the Windows-driver case and the kill switch.
@ -910,2 +737,2 @@
let usb_path = find_path(&usb_class, 1)?;
let hid_path = find_path(&hid_class, 0)?;
let usb_class = interface_class(super::VID, super::PID_PRO, Some(1))?;
let usb_path = find_path(&usb_class, super::VID, super::PID_PRO, Some(1))?;
Member

L5 (should fix): The shared lookup has not been exercised with the existing Switch 2 Pro Controller.

When: The Windows smoke run had no such controller, so a discovery or initialization regression would leave its USB controls and NFC unavailable without appearing in that run.

Do: Run a Windows USB Switch 2 Pro Controller through connection, controls, motion, rumble and NFC after the lookup move.

**L5** (should fix): The shared lookup has not been exercised with the existing Switch 2 Pro Controller. *When:* The Windows smoke run had no such controller, so a discovery or initialization regression would leave its USB controls and NFC unavailable without appearing in that run. **Do:** Run a Windows USB Switch 2 Pro Controller through connection, controls, motion, rumble and NFC after the lookup move.
fix(input): the drivers' switches as the game inherits them, and the GameCube lines in the game's log
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
22dbbc40ff
Review of #3245 (BeanBot):

- HOS_GAMECUBE (and HOS_SWITCH2, HOS_SWITCH2_RUMBLE_TEST) set in the environment
  the builder was started with reached the game but not the builder's drivers:
  pad_switches took only the command's own changes. A driver's switch the command
  neither sets nor removes is now the inherited one (pad_switches_of, tested).
- The driver's `gamecube:` lines went through tracing, which the builder's console
  filter drops: they are now written to its standard error, as the control
  channel's lines are, so they land in the game's longshot_log.txt.

Assisted-by: Claude Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Thanks for the review. Pushed 22dbbc40f; the description is updated.

  • L1 (fixed): right. pad_switches took only the command's own changes, so HOS_GAMECUBE=0 (and HOS_SWITCH2, already on main) set in the environment Longshot started with reached the game but not the builder's drivers. A driver's switch the command neither sets nor removes is now the inherited one (control::pad_switches_of), with tests for set, removed and inherited. The SDL_* ones stay as they were: the builder's SDL reads its own environment.
  • L2 (fixed): the gamecube: lines now go to the builder's standard error with eprintln!, as build_core::channel's control: lines do. In play, game_log's tee copies that into longshot_log.txt. The smoke run's log shows gamecube: looking for a GameCube controller adapter on WinUSB (HOS_GAMECUBE=0 leaves it alone). The sandbox and input docs now name longshot_log.txt. The same gap for the switch2: and pads: lines on main is being fixed in its own PR.
  • L3 (no change): standards.md's sentence is out of date with the tree rather than a rule this breaks. 33 files in builder/crates have #[allow(unsafe_code)] on main, among them switch2.rs's mod os, pads.rs, deck_imu.rs, channel.rs and control.rs, each with SAFETY comments. gamecube.rs's mod os and winusb.rs follow switch2.rs's pattern exactly, and winusb.rs is code moved out of switch2.rs, not new FFI. Bringing the standards sentence in line with the tree is a separate docs change.
  • L4, L5: agreed, both in Still to test. A player with the official adapter will build this PR from the Launcher. The Switch 2 Pro run needs someone with one.
Thanks for the review. Pushed 22dbbc40f; the description is updated. - **L1 (fixed):** right. `pad_switches` took only the command's own changes, so `HOS_GAMECUBE=0` (and `HOS_SWITCH2`, already on main) set in the environment Longshot started with reached the game but not the builder's drivers. A driver's switch the command neither sets nor removes is now the inherited one (`control::pad_switches_of`), with tests for set, removed and inherited. The `SDL_*` ones stay as they were: the builder's SDL reads its own environment. - **L2 (fixed):** the `gamecube:` lines now go to the builder's standard error with `eprintln!`, as `build_core::channel`'s `control:` lines do. In play, `game_log`'s tee copies that into `longshot_log.txt`. The smoke run's log shows `gamecube: looking for a GameCube controller adapter on WinUSB (HOS_GAMECUBE=0 leaves it alone)`. The sandbox and input docs now name `longshot_log.txt`. The same gap for the `switch2:` and `pads:` lines on main is being fixed in its own PR. - **L3 (no change):** `standards.md`'s sentence is out of date with the tree rather than a rule this breaks. 33 files in `builder/crates` have `#[allow(unsafe_code)]` on main, among them `switch2.rs`'s `mod os`, `pads.rs`, `deck_imu.rs`, `channel.rs` and `control.rs`, each with SAFETY comments. `gamecube.rs`'s `mod os` and `winusb.rs` follow `switch2.rs`'s pattern exactly, and `winusb.rs` is code moved out of `switch2.rs`, not new FFI. Bringing the standards sentence in line with the tree is a separate docs change. - **L4, L5:** agreed, both in Still to test. A player with the official adapter will build this PR from the Launcher. The Switch 2 Pro run needs someone with one.
test(input): no made-up HOS_ name in pad_switches_of's test (the switch table reads the builder's sources)
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
dc66d624ec
Assisted-by: Claude Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Pushed dc66d624e: pad_switches_of's test used a made-up HOS_OTHER name, which the switch table check would take for a switch; it is PATH now. Tests and the switch table check pass.

Pushed dc66d624e: pad_switches_of's test used a made-up HOS_OTHER name, which the switch table check would take for a switch; it is PATH now. Tests and the switch table check pass.
Author
Member
@review
BeanBot requested changes 2026-12-05 12:37:27 +00:00
Dismissed
BeanBot left a comment

Recommendation: Request changes. The new Windows code still places unsafe operations outside the locations permitted by the builder’s documented code rule. The adapter and the existing Switch 2 controller path also still need hardware runs.

The builder adds WinUSB support for Nintendo’s GameCube adapter and exposes its controllers as virtual SDL gamepads. It shares device lookup with the Switch 2 driver, at the cost of additional Windows-specific code and a background device scan.

Blocking (1): must change before merging.

  1. L3 builder/crates/build-core/src/gamecube.rs:167: The new Windows module permits unsafe code outside the locations allowed by the repository’s builder code rules; the new winusb.rs does the same. When: Both modules introduce Windows FFI under new allow(unsafe_code) exemptions, while docs/dev/standards.md restricts builder unsafe code to the named system-call modules. Do: Put the required unsafe system calls behind an allowed system-call boundary, or have the repository rule explicitly changed through the appropriate decision.

Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)

  • L4 builder/crates/build-core/src/gamecube.rs:378: The new device path has not been exercised with the adapter it is meant to support. When: The available game run had no adapter, so it cannot show that WinUSB discovery, report delivery, hotplug, controls and rumble work together on the official hardware. Do: Run the Launcher build on Windows with the official adapter on WinUSB: exercise all ports, controls, rumble, disconnect and reconnect, the Windows-driver case and the kill switch.
  • L5 builder/crates/build-core/src/switch2.rs:738: The shared lookup has not been exercised with the existing Switch 2 Pro Controller. When: The Windows smoke run had no such controller, so a discovery or initialization regression would leave its USB controls and NFC unavailable without appearing in that run. Do: Run a Windows USB Switch 2 Pro Controller through connection, controls, motion, rumble and NFC after the lookup move.

@fix can do L3.

Since the last review (on 4520f28001)
Resolved: L1 (The new kill switch is collected only from explicit Command overrides, so an inherited env…); L2 (The adapter setup and busy diagnostics use the build-core tracing target, which the builde…)
Still open: L3 (The new Windows module permits unsafe code outside the locations allowed by the repository…); L4 (The new device path has not been exercised with the adapter it is meant to support.); L5 (The shared lookup has not been exercised with the existing Switch 2 Pro Controller.)

Checks: Still running: 11 checks.

More: does it help, other systems, switches, what was read

Does it help: Unproven: recorded-byte tests cover the protocol, but no run with the adapter has shown the feature working. The reported Windows smoke run had no adapter connected.

Other systems: The shared WinUSB lookup also affects the Windows Switch 2 Pro Controller; its hardware run remains outstanding. Linux does not start either Windows driver. The reported Windows smoke run reached play without an adapter, but does not exercise the new device path.

Switches: HOS_GAMECUBE is added, on by default on Windows; setting it to 0 leaves the adapter available to other programs. Its table and user documentation are updated. HOS_SWITCH2 and HOS_SWITCH2_RUMBLE_TEST now also receive inherited environment values; their defaults are unchanged.

Reviewed: dc66d624ec against 7bc53f8413: Read the repository rules and PR template, the changes since the ledger head, gamecube.rs and winusb.rs, and the relevant switch collection, driver startup and logging paths. Skimmed the remaining PR diff and tests; did not read every changed code file in full.; nothing run (a code review).

Checked and fine:

  • The changed GameCube diagnostics consistently use standard error.
  • The switch collection tests cover inherited values, explicit overrides and removals.

Testing: No commands that build or run project code were executed. The author reports 33 build-core tests passing, a Windows smoke run without the adapter passing, and hardware runs still outstanding; CI is still running.

Overlaps and merge order: Not checked; network access is closed.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The new Windows code still places unsafe operations outside the locations permitted by the builder’s documented code rule. The adapter and the existing Switch 2 controller path also still need hardware runs. The builder adds WinUSB support for Nintendo’s GameCube adapter and exposes its controllers as virtual SDL gamepads. It shares device lookup with the Switch 2 driver, at the cost of additional Windows-specific code and a background device scan. **Blocking (1)**: must change before merging. 1. **L3** `builder/crates/build-core/src/gamecube.rs:167`: The new Windows module permits unsafe code outside the locations allowed by the repository’s builder code rules; the new winusb.rs does the same. *When:* Both modules introduce Windows FFI under new allow(unsafe_code) exemptions, while docs/dev/standards.md restricts builder unsafe code to the named system-call modules. **Do:** Put the required unsafe system calls behind an allowed system-call boundary, or have the repository rule explicitly changed through the appropriate decision. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L4** `builder/crates/build-core/src/gamecube.rs:378`: The new device path has not been exercised with the adapter it is meant to support. *When:* The available game run had no adapter, so it cannot show that WinUSB discovery, report delivery, hotplug, controls and rumble work together on the official hardware. **Do:** Run the Launcher build on Windows with the official adapter on WinUSB: exercise all ports, controls, rumble, disconnect and reconnect, the Windows-driver case and the kill switch. - **L5** `builder/crates/build-core/src/switch2.rs:738`: The shared lookup has not been exercised with the existing Switch 2 Pro Controller. *When:* The Windows smoke run had no such controller, so a discovery or initialization regression would leave its USB controls and NFC unavailable without appearing in that run. **Do:** Run a Windows USB Switch 2 Pro Controller through connection, controls, motion, rumble and NFC after the lookup move. `@fix` can do L3. **Since the last review** (on 4520f2800138) Resolved: L1 (The new kill switch is collected only from explicit Command overrides, so an inherited env…); L2 (The adapter setup and busy diagnostics use the build-core tracing target, which the builde…) Still open: L3 (The new Windows module permits unsafe code outside the locations allowed by the repository…); L4 (The new device path has not been exercised with the adapter it is meant to support.); L5 (The shared lookup has not been exercised with the existing Switch 2 Pro Controller.) **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven: recorded-byte tests cover the protocol, but no run with the adapter has shown the feature working. The reported Windows smoke run had no adapter connected. **Other systems:** The shared WinUSB lookup also affects the Windows Switch 2 Pro Controller; its hardware run remains outstanding. Linux does not start either Windows driver. The reported Windows smoke run reached play without an adapter, but does not exercise the new device path. **Switches:** HOS_GAMECUBE is added, on by default on Windows; setting it to 0 leaves the adapter available to other programs. Its table and user documentation are updated. HOS_SWITCH2 and HOS_SWITCH2_RUMBLE_TEST now also receive inherited environment values; their defaults are unchanged. **Reviewed:** dc66d624ecff against 7bc53f841323: Read the repository rules and PR template, the changes since the ledger head, gamecube.rs and winusb.rs, and the relevant switch collection, driver startup and logging paths. Skimmed the remaining PR diff and tests; did not read every changed code file in full.; nothing run (a code review). **Checked and fine:** - The changed GameCube diagnostics consistently use standard error. - The switch collection tests cover inherited values, explicit overrides and removals. **Testing:** No commands that build or run project code were executed. The author reports 33 build-core tests passing, a Windows smoke run without the adapter passing, and hardware runs still outstanding; CI is still running. **Overlaps and merge order:** Not checked; network access is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
Author
Member

Pushed 338bbafae: a tester's official adapter connected through the Launcher build, but input came through only now and then, with a lot of delay. The likely cause: the driver read 64 bytes at a time while a report is 37, and WinUSB keeps the extra for the next read, so reports after the first no longer lined up and most were dropped. It now reads one 37-byte report at a time, as Dolphin does, and the log says the adapter's packet size and how many of the first 1000 reads were no report. Not run on hardware yet: the tester will rebuild. Game-free tests and clippy pass (but for main's note_lines).

Pushed 338bbafae: a tester's official adapter connected through the Launcher build, but input came through only now and then, with a lot of delay. The likely cause: the driver read 64 bytes at a time while a report is 37, and WinUSB keeps the extra for the next read, so reports after the first no longer lined up and most were dropped. It now reads one 37-byte report at a time, as Dolphin does, and the log says the adapter's packet size and how many of the first 1000 reads were no report. Not run on hardware yet: the tester will rebuild. Game-free tests and clippy pass (but for main's note_lines).
fix(input): read the GameCube adapter one report at a time
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
338bbafaef
A tester's adapter connected but its input came through only now and then, late:
the driver asked for 64 bytes a read, and WinUSB keeps what a read takes of the
next report for the read after, so after the first report the reads no longer
began at one and most were dropped. It reads 37 bytes, one report, as Dolphin
does. The log says the adapter's packet size and, after 1000 reads, how many were
no report, so a player's log shows whether the reports arrive whole.

Assisted-by: Claude Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Testing: the tester's first run (dc66d624e) added; the read fix (338bbafae) is to be run next.

Testing: the tester's first run (dc66d624e) added; the read fix (338bbafae) is to be run next.
Author
Member

Tested on hardware: the player with the official adapter rebuilt the PR in the Launcher with the read fix (338bbafae) and reports it "works perfect". Several controllers, a WaveBird, rumble and plugging in and out stay in Still to test until they say.

Tested on hardware: the player with the official adapter rebuilt the PR in the Launcher with the read fix (338bbafae) and reports it "works perfect". Several controllers, a WaveBird, rumble and plugging in and out stay in Still to test until they say.
Author
Member
@review
BeanBot requested changes 2026-12-05 13:25:15 +00:00
Dismissed
BeanBot left a comment

Recommendation: Request changes. The adapter now works in the player's basic hardware run, but the new Windows code still violates the repository's stated unsafe-code location rule. The moved Switch 2 lookup also awaits a hardware run.

Adds Windows support for Nintendo's GameCube adapter through WinUSB and shares device lookup with the Switch 2 driver. It adds a polling thread and device-specific code so adapter controllers can reach the game as virtual pads.

Blocking (1): must change before merging.

  1. L3 builder/crates/build-core/src/gamecube.rs:167: The new Windows module permits unsafe code outside the locations allowed by the repository’s builder code rules; the new winusb.rs does the same. When: Both modules introduce Windows FFI under new allow(unsafe_code) exemptions, while docs/dev/standards.md restricts builder unsafe code to the named system-call modules. Do: Put the required unsafe system calls behind an allowed system-call boundary, or have the repository rule explicitly changed through the appropriate decision.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L5 builder/crates/build-core/src/switch2.rs:738: The shared lookup has not been exercised with the existing Switch 2 Pro Controller. When: The Windows smoke run had no such controller, so a discovery or initialization regression would leave its USB controls and NFC unavailable without appearing in that run. Do: Run a Windows USB Switch 2 Pro Controller through connection, controls, motion, rumble and NFC after the lookup move.

@fix can do L3.

Since the last review (on dc66d624ec)
Resolved: L4 (The new device path has not been exercised with the adapter it is meant to support.)
Still open: L3 (The new Windows module permits unsafe code outside the locations allowed by the repository…); L5 (The shared lookup has not been exercised with the existing Switch 2 Pro Controller.)

Checks: Still running: 11 checks.

Also noticed (2; not asked for, not blocking)
  • Multiple controllers, WaveBird, rumble and controller hotplug remain to be exercised on the adapter.
  • The sandbox reference still says the GameCube adapter has not been run with an adapter.
More: does it help, other systems, switches, what was read

Does it help: Yes for basic input: the player reported that the official adapter worked without delay on head 338bbafae. Multiple controllers, WaveBird, rumble and hotplug remain untested; this is not a performance change.

Other systems: The shared Windows WinUSB lookup can affect the Switch 2 Pro Controller; its hardware run remains outstanding. The GameCube driver is Windows-only; Linux does not run that device path.

Switches: HOS_GAMECUBE is new and defaults on for Windows adapter support; 0 leaves the adapter to another program. HOS_SWITCH2 and HOS_GAMECUBE now also follow inherited game environment values. The default enables the feature and the opt-out addresses exclusive access.

Reviewed: 338bbafaef against 7bc53f8413: Read AGENTS.md, CONTRIBUTING.md, the PR template, the applicable unsafe-code rule, gamecube.rs, winusb.rs and lib.rs; inspected the diff and surrounding changed code. The larger control.rs, pads.rs and switch2.rs output was skimmed. docs/review-checklist.md and the adjacent Tooling AGENTS.md were absent.; nothing run (a code review).

Checked and fine:

  • The read buffer now holds one 37-byte report, and the player reports that the delayed input is gone.
  • The fix retains the adapter driver and its intended feature.

Testing: No commands from the project were run. The author reports game-free checks and a Windows smoke run; the player reports a successful basic adapter run on this head. CI is still running.

Overlaps and merge order: Not checked; the network is closed.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The adapter now works in the player's basic hardware run, but the new Windows code still violates the repository's stated unsafe-code location rule. The moved Switch 2 lookup also awaits a hardware run. Adds Windows support for Nintendo's GameCube adapter through WinUSB and shares device lookup with the Switch 2 driver. It adds a polling thread and device-specific code so adapter controllers can reach the game as virtual pads. **Blocking (1)**: must change before merging. 1. **L3** `builder/crates/build-core/src/gamecube.rs:167`: The new Windows module permits unsafe code outside the locations allowed by the repository’s builder code rules; the new winusb.rs does the same. *When:* Both modules introduce Windows FFI under new allow(unsafe_code) exemptions, while docs/dev/standards.md restricts builder unsafe code to the named system-call modules. **Do:** Put the required unsafe system calls behind an allowed system-call boundary, or have the repository rule explicitly changed through the appropriate decision. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L5** `builder/crates/build-core/src/switch2.rs:738`: The shared lookup has not been exercised with the existing Switch 2 Pro Controller. *When:* The Windows smoke run had no such controller, so a discovery or initialization regression would leave its USB controls and NFC unavailable without appearing in that run. **Do:** Run a Windows USB Switch 2 Pro Controller through connection, controls, motion, rumble and NFC after the lookup move. `@fix` can do L3. **Since the last review** (on dc66d624ecff) Resolved: L4 (The new device path has not been exercised with the adapter it is meant to support.) Still open: L3 (The new Windows module permits unsafe code outside the locations allowed by the repository…); L5 (The shared lookup has not been exercised with the existing Switch 2 Pro Controller.) **Checks:** Still running: 11 checks. <details> <summary>Also noticed (2; not asked for, not blocking)</summary> - Multiple controllers, WaveBird, rumble and controller hotplug remain to be exercised on the adapter. - The sandbox reference still says the GameCube adapter has not been run with an adapter. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for basic input: the player reported that the official adapter worked without delay on head 338bbafae. Multiple controllers, WaveBird, rumble and hotplug remain untested; this is not a performance change. **Other systems:** The shared Windows WinUSB lookup can affect the Switch 2 Pro Controller; its hardware run remains outstanding. The GameCube driver is Windows-only; Linux does not run that device path. **Switches:** HOS_GAMECUBE is new and defaults on for Windows adapter support; 0 leaves the adapter to another program. HOS_SWITCH2 and HOS_GAMECUBE now also follow inherited game environment values. The default enables the feature and the opt-out addresses exclusive access. **Reviewed:** 338bbafaef80 against 7bc53f841323: Read AGENTS.md, CONTRIBUTING.md, the PR template, the applicable unsafe-code rule, gamecube.rs, winusb.rs and lib.rs; inspected the diff and surrounding changed code. The larger control.rs, pads.rs and switch2.rs output was skimmed. docs/review-checklist.md and the adjacent Tooling AGENTS.md were absent.; nothing run (a code review). **Checked and fine:** - The read buffer now holds one 37-byte report, and the player reports that the delayed input is gone. - The fix retains the adapter driver and its intended feature. **Testing:** No commands from the project were run. The author reports game-free checks and a Windows smoke run; the player reports a successful basic adapter run on this head. CI is still running. **Overlaps and merge order:** Not checked; the network is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
docs(sandbox): the GameCube adapter has run with a player's adapter, one controller's input
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
b6a1649279
Assisted-by: Claude Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Pushed b6a164927: the sandbox table's GameCube row says it has run with a player's adapter (one controller's input), not yet with several controllers, a WaveBird, rumble or replugging. L3 (unsafe outside sys.rs/disk.rs) is left for a maintainer's decision, as the review asks: the rule as written doesn't match main (33 builder files have #[allow(unsafe_code)], switch2.rs's mod os among them), and this PR follows switch2.rs's pattern.

Pushed b6a164927: the sandbox table's GameCube row says it has run with a player's adapter (one controller's input), not yet with several controllers, a WaveBird, rumble or replugging. L3 (unsafe outside sys.rs/disk.rs) is left for a maintainer's decision, as the review asks: the rule as written doesn't match main (33 builder files have #[allow(unsafe_code)], switch2.rs's mod os among them), and this PR follows switch2.rs's pattern.
Author
Member

L3: the rule's wording is proposed in #3250 (docs only), matching what main does: a module or function that calls the system or a C library itself allows unsafe, each block with its SAFETY comment. If a maintainer turns it down, this PR's WinUSB and SetupDi calls move to sys.rs instead.

L3: the rule's wording is proposed in https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/3250 (docs only), matching what main does: a module or function that calls the system or a C library itself allows unsafe, each block with its SAFETY comment. If a maintainer turns it down, this PR's WinUSB and SetupDi calls move to sys.rs instead.
Author
Member
@review
BeanBot left a comment

Recommendation: Request changes. The new Windows code still violates the builder’s documented unsafe-code rule. The existing Switch 2 Pro Controller path also awaits a hardware run after its lookup was moved.

The builder adds support for Nintendo’s GameCube adapter through WinUSB, including virtual gamepads and rumble, while sharing device lookup with the Switch 2 driver. One player reports working input with the adapter; the new Windows FFI code adds maintenance cost and currently conflicts with the repository’s stated rule.

Blocking (1): must change before merging.

  1. L3 builder/crates/build-core/src/gamecube.rs:167: The new Windows module permits unsafe code outside the locations allowed by the repository’s builder code rules; the new winusb.rs does the same. When: Both modules introduce Windows FFI under new allow(unsafe_code) exemptions, while docs/dev/standards.md restricts builder unsafe code to the named system-call modules. Do: Put the required unsafe system calls behind an allowed system-call boundary, or have the repository rule explicitly changed through the appropriate decision.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L5 builder/crates/build-core/src/switch2.rs:738: The shared lookup has not been exercised with the existing Switch 2 Pro Controller. When: The Windows smoke run had no such controller, so a discovery or initialization regression would leave its USB controls and NFC unavailable without appearing in that run. Do: Run a Windows USB Switch 2 Pro Controller through connection, controls, motion, rumble and NFC after the lookup move.

@fix can do L3.

Since the last review (on 338bbafaef)
Still open: L3 (The new Windows module permits unsafe code outside the locations allowed by the repository…); L5 (The shared lookup has not been exercised with the existing Switch 2 Pro Controller.)

Checks: Still running: 11 checks.

Also noticed (2; not asked for, not blocking)
  • The sandbox table accurately records the reported single-controller run and the remaining adapter scenarios.
  • The author proposes updating the unsafe-code rule in Longshot#3250; the current rule remains in force until that change is accepted.
More: does it help, other systems, switches, what was read

Does it help: Yes for one controller’s input: a player reported that the Launcher build at 338bbafae worked perfectly after the 37-byte read fix. Multiple controllers, WaveBird, rumble and reconnects remain untested.

Other systems: The shared WinUSB lookup can affect the existing Windows Switch 2 Pro Controller; no hardware run after the move is reported. The adapter’s multi-controller, wireless, rumble, reconnect and competing-program paths also remain to be exercised.

Switches: HOS_GAMECUBE is added, enabled by default; setting it to 0 leaves the adapter alone. HOS_SWITCH2 retains its enabled default, and both driver switches now honor the game’s inherited environment. The defaults support automatic controller use, with an opt-out for competing programs.

Reviewed: b6a1649279 against 7bc53f8413: Read the current sandbox diff and its surrounding table, the relevant unsafe-code rule and unsafe locations, commit list, supplied description, comments, CI and ledger. The remaining changed code and repository rules were not read in full for this re-check.; nothing run (a code review).

Checked and fine:

  • The changed sandbox row matches the reported adapter test and does not claim the remaining scenarios passed.

Testing: No commands that build, run tests or execute project code were run. The reported player run passed for one controller; Switch 2 hardware testing and the listed adapter scenarios remain outstanding. CI is still running.

Overlaps and merge order: Longshot#3250 proposes changing the unsafe-code rule; its acceptance before this pull request would affect L3.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The new Windows code still violates the builder’s documented unsafe-code rule. The existing Switch 2 Pro Controller path also awaits a hardware run after its lookup was moved. The builder adds support for Nintendo’s GameCube adapter through WinUSB, including virtual gamepads and rumble, while sharing device lookup with the Switch 2 driver. One player reports working input with the adapter; the new Windows FFI code adds maintenance cost and currently conflicts with the repository’s stated rule. **Blocking (1)**: must change before merging. 1. **L3** `builder/crates/build-core/src/gamecube.rs:167`: The new Windows module permits unsafe code outside the locations allowed by the repository’s builder code rules; the new winusb.rs does the same. *When:* Both modules introduce Windows FFI under new allow(unsafe_code) exemptions, while docs/dev/standards.md restricts builder unsafe code to the named system-call modules. **Do:** Put the required unsafe system calls behind an allowed system-call boundary, or have the repository rule explicitly changed through the appropriate decision. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L5** `builder/crates/build-core/src/switch2.rs:738`: The shared lookup has not been exercised with the existing Switch 2 Pro Controller. *When:* The Windows smoke run had no such controller, so a discovery or initialization regression would leave its USB controls and NFC unavailable without appearing in that run. **Do:** Run a Windows USB Switch 2 Pro Controller through connection, controls, motion, rumble and NFC after the lookup move. `@fix` can do L3. **Since the last review** (on 338bbafaef80) Still open: L3 (The new Windows module permits unsafe code outside the locations allowed by the repository…); L5 (The shared lookup has not been exercised with the existing Switch 2 Pro Controller.) **Checks:** Still running: 11 checks. <details> <summary>Also noticed (2; not asked for, not blocking)</summary> - The sandbox table accurately records the reported single-controller run and the remaining adapter scenarios. - The author proposes updating the unsafe-code rule in Longshot#3250; the current rule remains in force until that change is accepted. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for one controller’s input: a player reported that the Launcher build at 338bbafae worked perfectly after the 37-byte read fix. Multiple controllers, WaveBird, rumble and reconnects remain untested. **Other systems:** The shared WinUSB lookup can affect the existing Windows Switch 2 Pro Controller; no hardware run after the move is reported. The adapter’s multi-controller, wireless, rumble, reconnect and competing-program paths also remain to be exercised. **Switches:** HOS_GAMECUBE is added, enabled by default; setting it to 0 leaves the adapter alone. HOS_SWITCH2 retains its enabled default, and both driver switches now honor the game’s inherited environment. The defaults support automatic controller use, with an opt-out for competing programs. **Reviewed:** b6a1649279c5 against 7bc53f841323: Read the current sandbox diff and its surrounding table, the relevant unsafe-code rule and unsafe locations, commit list, supplied description, comments, CI and ledger. The remaining changed code and repository rules were not read in full for this re-check.; nothing run (a code review). **Checked and fine:** - The changed sandbox row matches the reported adapter test and does not claim the remaining scenarios passed. **Testing:** No commands that build, run tests or execute project code were run. The reported player run passed for one controller; Switch 2 hardware testing and the listed adapter scenarios remain outstanding. CI is still running. **Overlaps and merge order:** Longshot#3250 proposes changing the unsafe-code rule; its acceptance before this pull request would affect L3. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
Author
Member

Thanks. On the review of b6a164927:

  • L3: it waits on #3250, as the review says. That PR rewrites the rule to what main does: a module or function that reaches the system itself (a system or C library call, a raw handle or descriptor, a mapped file) allows unsafe, each block with its // SAFETY: comment. Its review recommends approval, and its one should-fix (raw handles and mapped files) is pushed. Once a maintainer merges it, this PR's gamecube.rs mod os and winusb.rs fall under it: they are WinUSB, SetupDi and registry calls, each block with its SAFETY comment, as in switch2.rs's mod os. If 3250 is turned down, the calls move to sys.rs here.
  • L5: agreed, still to run. It needs someone with a Switch 2 Pro Controller on USB: connection, buttons, motion, rumble and NFC after the lookup moved to winusb.rs. The lookup's strings are unchanged (VID_057E&PID_2069&MI_01 for the WinUSB interface, &MI_00 for HID), and winusb.rs's tests check them.
  • Also noticed: thanks for checking the sandbox row. The adapter's other cases (several controllers, a WaveBird, rumble, replugging, no Zadig, Dolphin with HOS_GAMECUBE=0) stay in Still to test until the player reports them.
Thanks. On the review of b6a164927: - **L3:** it waits on https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/3250, as the review says. That PR rewrites the rule to what main does: a module or function that reaches the system itself (a system or C library call, a raw handle or descriptor, a mapped file) allows `unsafe`, each block with its `// SAFETY:` comment. Its review recommends approval, and its one should-fix (raw handles and mapped files) is pushed. Once a maintainer merges it, this PR's `gamecube.rs` `mod os` and `winusb.rs` fall under it: they are WinUSB, SetupDi and registry calls, each block with its SAFETY comment, as in `switch2.rs`'s `mod os`. If 3250 is turned down, the calls move to `sys.rs` here. - **L5:** agreed, still to run. It needs someone with a Switch 2 Pro Controller on USB: connection, buttons, motion, rumble and NFC after the lookup moved to `winusb.rs`. The lookup's strings are unchanged (`VID_057E&PID_2069&MI_01` for the WinUSB interface, `&MI_00` for HID), and `winusb.rs`'s tests check them. - **Also noticed:** thanks for checking the sandbox row. The adapter's other cases (several controllers, a WaveBird, rumble, replugging, no Zadig, Dolphin with `HOS_GAMECUBE=0`) stay in Still to test until the player reports them.
Owner
@rebase
Member

I rebased this pull request onto main (9eebe07ea1): the new head is 4a66755b8d.

Conflicts resolved

  • docs/dev/reference/sandbox.md: Kept the base branch’s logging guidance and added the GameCube adapter check using the same log location.
  • builder/crates/build-core/src/gamecube.rs: Restored GameCube tracing calls so the base branch routes them to the game log.
  • docs/dev/reference/input.md: Kept the game log guidance and corrected the logging route and prefix.
  • docs/dev/reference/sandbox.md: Kept the merged GameCube testing guidance and log prefix.
  • Also changed, beyond the conflict: builder/crates/build-core/src/gamecube.rs, docs/dev/reference/input.md
  • builder/crates/build-core/src/gamecube.rs: Kept one-report reads and packet diagnostics, using the base branch’s tracing logs.
  • docs/dev/reference/sandbox.md: Kept the base branch’s log references and the pull request’s GameCube adapter test results.

Nothing was built or run: read the resolution before merging.


Automated rebase by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

I rebased this pull request onto `main` (9eebe07ea10c): the new head is 4a66755b8d95. **Conflicts resolved** - docs/dev/reference/sandbox.md: Kept the base branch’s logging guidance and added the GameCube adapter check using the same log location. - builder/crates/build-core/src/gamecube.rs: Restored GameCube tracing calls so the base branch routes them to the game log. - docs/dev/reference/input.md: Kept the game log guidance and corrected the logging route and prefix. - docs/dev/reference/sandbox.md: Kept the merged GameCube testing guidance and log prefix. - Also changed, beyond the conflict: `builder/crates/build-core/src/gamecube.rs`, `docs/dev/reference/input.md` - builder/crates/build-core/src/gamecube.rs: Kept one-report reads and packet diagnostics, using the base branch’s tracing logs. - docs/dev/reference/sandbox.md: Kept the base branch’s log references and the pull request’s GameCube adapter test results. Nothing was built or run: read the resolution before merging. --- <sub>Automated rebase by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
BeanBot force-pushed feat/gamecube-adapter from b6a1649279
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to 4a66755b8d
Some checks failed
PR description / Title and description (pull_request_target) Successful in 7s
CI / What the change needs (pull_request) Successful in 8s
CI / Third-party parts and guide screenshots (pull_request) Successful in 14s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 18s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 1m25s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 10m37s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 32m36s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 9m37s
CI / Website build and checks (pull_request) Failing after 42s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 50m21s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 1h0m9s
2026-12-05 17:09:23 +00:00
Compare
HumanBean deleted branch feat/gamecube-adapter 2026-12-05 17:09:43 +00:00
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The GameCube adapter works for one controller in the reported hardware run, and the unsafe-code rule now permits the Windows modules. The moved Switch 2 Pro lookup still needs its hardware run. Recommend approval; not approved on the forge.

The builder reads Nintendo’s GameCube adapter through WinUSB and exposes its controllers as virtual gamepads. It shares device lookup code with the Switch 2 driver and adds a default-on kill switch.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L5 builder/crates/build-core/src/switch2.rs:738: The shared lookup has not been exercised with the existing Switch 2 Pro Controller. When: The Windows smoke run had no such controller, so a discovery or initialization regression would leave its USB controls and NFC unavailable without appearing in that run. Do: Run a Windows USB Switch 2 Pro Controller through connection, controls, motion, rumble and NFC after the lookup move.

Since the last review (on b6a1649279)
Resolved: L3 (The new Windows module permits unsafe code outside the locations allowed by the repository…)
Still open: L5 (The shared lookup has not been exercised with the existing Switch 2 Pro Controller.)

Checks: Still running: PR description / Title and description (pull_request_target).

Also noticed (1; not asked for, not blocking)
  • The description’s claim that switch2 and pads tracing lines are dropped is stale: the console filter now includes their targets.
More: does it help, other systems, switches, what was read

Does it help: Yes: the player reported that one controller worked without delay on commit 338bbafae after the report-size fix. Multiple controllers, WaveBird, rumble and reconnects remain untested in the reported run.

Other systems: The shared lookup also affects the Windows Switch 2 Pro Controller; its hardware run remains outstanding. The adapter driver is Windows-only; Linux and other gamepad paths are not intended to change.

Switches: HOS_GAMECUBE is added, default on; HOS_GAMECUBE=0 leaves the adapter to other programs. HOS_SWITCH2 and HOS_GAMECUBE now also honor inherited environment values. The default enables the feature, though it can claim the adapter before another program.

Reviewed: 4a66755b8d against 9eebe07ea1: Read the changed GameCube logging lines, the console logging filter, the unsafe-code rule and unsafe annotations; inspected the change summary and commit history. The remaining changed files and repository review rules were not read in full.; nothing run (a code review).

Checked and fine:

  • The console filter includes build_core::gamecube and writes its tracing messages to standard error for the game log.

Testing: The reported Windows hardware run passed for one GameCube controller; the Switch 2 Pro run remains outstanding. No tests were run during this read-only review.

Overlaps and merge order: The unsafe-code standards change is present in the base; the comments identify PR #3250. The logging filter is also present in the base.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its rebase. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left. The GameCube adapter works for one controller in the reported hardware run, and the unsafe-code rule now permits the Windows modules. The moved Switch 2 Pro lookup still needs its hardware run. Recommend approval; not approved on the forge. The builder reads Nintendo’s GameCube adapter through WinUSB and exposes its controllers as virtual gamepads. It shares device lookup code with the Switch 2 driver and adds a default-on kill switch. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L5** `builder/crates/build-core/src/switch2.rs:738`: The shared lookup has not been exercised with the existing Switch 2 Pro Controller. *When:* The Windows smoke run had no such controller, so a discovery or initialization regression would leave its USB controls and NFC unavailable without appearing in that run. **Do:** Run a Windows USB Switch 2 Pro Controller through connection, controls, motion, rumble and NFC after the lookup move. **Since the last review** (on b6a1649279c5) Resolved: L3 (The new Windows module permits unsafe code outside the locations allowed by the repository…) Still open: L5 (The shared lookup has not been exercised with the existing Switch 2 Pro Controller.) **Checks:** Still running: `PR description / Title and description (pull_request_target)`. <details> <summary>Also noticed (1; not asked for, not blocking)</summary> - The description’s claim that switch2 and pads tracing lines are dropped is stale: the console filter now includes their targets. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes: the player reported that one controller worked without delay on commit 338bbafae after the report-size fix. Multiple controllers, WaveBird, rumble and reconnects remain untested in the reported run. **Other systems:** The shared lookup also affects the Windows Switch 2 Pro Controller; its hardware run remains outstanding. The adapter driver is Windows-only; Linux and other gamepad paths are not intended to change. **Switches:** HOS_GAMECUBE is added, default on; HOS_GAMECUBE=0 leaves the adapter to other programs. HOS_SWITCH2 and HOS_GAMECUBE now also honor inherited environment values. The default enables the feature, though it can claim the adapter before another program. **Reviewed:** 4a66755b8d95 against 9eebe07ea10c: Read the changed GameCube logging lines, the console logging filter, the unsafe-code rule and unsafe annotations; inspected the change summary and commit history. The remaining changed files and repository review rules were not read in full.; nothing run (a code review). **Checked and fine:** - The console filter includes build_core::gamecube and writes its tracing messages to standard error for the game log. **Testing:** The reported Windows hardware run passed for one GameCube controller; the Switch 2 Pro run remains outstanding. No tests were run during this read-only review. **Overlaps and merge order:** The unsafe-code standards change is present in the base; the comments identify PR #3250. The logging filter is also present in the base. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its rebase. Nothing was run; a maintainer decides.</sub>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
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
MagicBeanDev/Longshot!3245
No description provided.