RobLoach / RobLoach/SDL_libretro
Menu: Gamepad menu combos
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2
- Forks
- 0
- Avg merge
- 16h 55m
- Merged PRs (30d)
- 12
Description
Depends on the menu system from #129 / PR #169. Complements the rebindable-hotkeys issue.
Context
The menu currently opens with F1 or the gamepad Guide button, but many generic controllers have no Guide button, leaving gamepad-only setups unable to open the menu. raylib-libretro offers selectable button combos (LibretroMenuCombo): Select+Start, L1+R1, L2+R2, L3+R3, Down+Select, checked per-frame via LibretroMenuComboTriggered().
Proposed design
- A Menu Combo combobox in Settings (
None|Select+Start|L1+R1|L2+R2|L3+R3|Down+Select). - Check the combo in
SDL_Libretro_UpdateMenu()usingSDL_GetGamepadButtonover the open gamepads (or nk_gamepad state), with edge detection so it fires once per press. - Suppress the frame's combo buttons from reaching the core when the combo triggers, so the game doesn't also react.
- Persist the selection in the config (
menucombo).
Tasks
- Combo enum + per-frame trigger detection
- Settings combobox + config persistence
- Input suppression when the combo fires
-
test_Menucoverage with synthetic gamepad state where feasible - README update
References
- raylib-libretro
include/raylib-libretro-menu.h:LibretroMenuCombo,LibretroMenuComboTriggered()
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with SDL_Libretro_UpdateMenu(), the raylib-libretro menu header reference, and the existing Settings/config flow. Review SDL_GetGamepadButton or nk_gamepad state and test_Menu for the relevant input behavior. Done means the listed combos trigger once, suppress their buttons for that frame, persist through config, have feasible test coverage, and are documented in README.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100