Skip to content

Controls: Player 2 on the Gamepad tab (input.player2) — #101 phase 2 - #103

Merged
gascarcella merged 1 commit into
mainfrom
gascarcella/player2-controls
Oct 24, 2026
Merged

gascarcella merged 1 commit into
mainfrom
gascarcella/player2-controls

Conversation

@gascarcella

Copy link
Copy Markdown
Owner

Phase 2 of #101: the launcher's and in-game menu's side of the second pad (phase 1, #102, was the runtime).

What

  • Gamepad tab: Player 2 (input.player2): Off / First gamepad / Second gamepad, a line on what the choice does, and the gamepads connected now with the player each is. Gamepads are counted by SDL instance id, as the runtime does; in the in-game menu that's the game's own count. The table's note says both players use this map, and the Hotkeys tab says player 2's gamepad never fires a hotkey.
  • Settings file: player2 is written once set and kept once in the file (as video.menu_size). A bad value gets a warning and reads as "off". The in-game menu applies it live (runtime/live.c already re-applies input).
  • The Controls tabs fit the in-game menu at 640x480. Before, the Keyboard and Gamepad tables were 309 and 480 px too wide.
    • Their chips now wrap, as the Hotkeys table's do.
    • The buttons' column is as wide as its widest name. Auto-fitted, it was squeezed below the names once the chips wrapped.
    • The note above a table keeps its Reset button beside it only when both fit. Before, a SameLine() after the wrapped note pushed the next line's start past the edge.
  • <PREFIX>_PORT_MENU_SCREEN=controls:<tab> (Screens::show_controls_tab), for a picture of one tab.

Gates that ran

  • tests/hello_test.py --menu: everything it ran before, plus the in-game menu's Gamepad tab at 640x480 with player 2 set: nothing wider than its window (new; it failed before the layout fixes). All three Controls tabs fit at 640x480.
  • Launcher self-test (dw2003 description): 567/567. New checks: input.player2 written, read back, kept once set to off, a bad value warned about, none written for a file without it. The game's parser gets "player2": "second". Picture 8b-Controls-gamepad.png shows the Gamepad tab with two virtual gamepads.
  • hello's launcher self-test: 530/530 (its play path is skipped, as before: hello has no disc). The game reading the string the launcher writes is covered by phase 1's runs, which give the game the same value.
  • Windows: the launcher cross-built with no diagnostics; its self-test under Wine passes 564/564.
  • Not run: dw2003recomp's scripts/test.sh. Nothing under runtime/, psyq/, cmake/ or the contract changed; the changes are in launcher/ (launcher/ui is compiled into the game only with PSXSTACK_MENU).

Notes

  • In the self-test picture both virtual pads show the same name: SDL names a gamepad by its mapping, so two look-alike virtual pads share one. Real pads show their own names.

🤖 Generated with Claude Code

…it 640x480

The launcher and the in-game menu read and write input.player2 (#101): the
Gamepad tab starts with Player 2 (Off, First gamepad, Second gamepad), a line
on what the choice does, and the gamepads connected now with the player each
is, counted in connection order as the runtime does. It is written once set
and kept once in the file (as video.menu_size); a bad value is warned about
and reads as "off". The in-game menu applies it live (runtime/live.c already
re-applies input).

The Keyboard and Gamepad tables did not fit the in-game menu over a 640x480
window (309 and 480 px too wide): their chips now wrap as the Hotkeys table's
do, the buttons' column is as wide as its widest name (auto-fitted, it was
squeezed below the names once the chips wrap), and the note above a table
keeps its Reset button beside it only when both fit (a SameLine after the
wrapped note put the next line's start past the edge).

<PREFIX>_PORT_MENU_SCREEN takes controls:<tab> (Screens::show_controls_tab),
so tests/hello_test.py --menu takes the Gamepad tab at 640x480 with player 2
set and requires it to fit. The launcher self-test checks the setting's round
trips, gives the game's parser player2 "second", and takes a picture of the
Gamepad tab with two virtual gamepads connected.

Part of #101 (phase 2 of 3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gascarcella
gascarcella merged commit 6160450 into main Oct 24, 2026
5 checks passed
@gascarcella
gascarcella deleted the gascarcella/player2-controls branch October 24, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant