The Insert menu from a controller #343

Merged
gab9281 merged 2 commits from input/menu-gamepad into main 2026-11-07 23:47:54 +00:00
gab9281 commented 2026-11-07 21:47:19 +00:00 (Migrated from github.com)

Part of splitting #83 into small PRs. Depends on #335 (the controls table): this branch is built on it, so its first commit is #335's. Only the last one is new here.

The menu only opened with Insert or F1, so it couldn't be used from the couch.

  • A gamepad's Home button now opens and closes it. So do Select and Start pressed together, for pads whose Home button the system keeps for itself.
  • While the menu is open, the D-pad chooses and changes, the bottom face button changes the option as Right does, and the right face button closes the menu. Enter works like the bottom face button.
  • While the menu is open, the game gets no gamepad input, as it already gets no keyboard input.
  • After the menu closes, the pads reach the game again once every button is let go, so the press that closed the menu never reaches the game.
  • While Select and Start are both held, the game sees neither.
  • The renderer's host table gains pad_raw, the gamepads' inputs by position (API version 2).

D-pad down twice to Frame pacing, then the bottom face button:

the menu, before and after the bottom face button

Select+Start opens the menu; the right face button closes it, and the game stays on the title screen; the next press of that button reaches the game (Load):

open, closed, next press

Tested on Linux (game built from this branch, a virtual Xbox 360 pad through uinput, which SDL saw as Xbox 360 Controller, with a DualSense connected too): each step above is what the screenshots show. A face-button press with the menu closed reaches the game as before. tests/ gives the same result as on main (the 4 test_cpp_preflight checks need Visual Studio).

Merge note: #324 also takes API version 2 for options_path. Whichever lands second bumps the version to 3.

🤖 Generated with Claude Code

Part of splitting #83 into small PRs. **Depends on #335** (the controls table): this branch is built on it, so its first commit is #335's. Only the last one is new here. The menu only opened with Insert or F1, so it couldn't be used from the couch. - A gamepad's Home button now opens and closes it. So do Select and Start pressed together, for pads whose Home button the system keeps for itself. - While the menu is open, the D-pad chooses and changes, the bottom face button changes the option as Right does, and the right face button closes the menu. Enter works like the bottom face button. - While the menu is open, the game gets no gamepad input, as it already gets no keyboard input. - After the menu closes, the pads reach the game again once every button is let go, so the press that closed the menu never reaches the game. - While Select and Start are both held, the game sees neither. - The renderer's host table gains `pad_raw`, the gamepads' inputs by position (API version 2). D-pad down twice to Frame pacing, then the bottom face button: ![the menu, before and after the bottom face button](https://raw.githubusercontent.com/gab9281/Hookshot/pr-assets/menu-gamepad/d-pad-then-bottom-button.png) Select+Start opens the menu; the right face button closes it, and the game stays on the title screen; the next press of that button reaches the game (Load): ![open, closed, next press](https://raw.githubusercontent.com/gab9281/Hookshot/pr-assets/menu-gamepad/select-start-close-then-a.png) **Tested on Linux** (game built from this branch, a virtual Xbox 360 pad through uinput, which SDL saw as `Xbox 360 Controller`, with a DualSense connected too): each step above is what the screenshots show. A face-button press with the menu closed reaches the game as before. `tests/` gives the same result as on main (the 4 `test_cpp_preflight` checks need Visual Studio). Merge note: #324 also takes API version 2 for `options_path`. Whichever lands second bumps the version to 3. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
gab9281 commented 2026-11-07 23:26:33 +00:00 (Migrated from github.com)

@NotRexed rebased on current main (9e8fb5b). It sits on the rebased #335.

@NotRexed rebased on current main (9e8fb5b). It sits on the rebased #335.
Commenting is not possible because the repository is archived.
No description provided.