input: rebindable gamepad button mapping per port
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with raylib-libretro.h, especially LibretroMenu and LibretroRetroJoypadButtonToGamepadButton(), then inspect the Settings > Input flow and rlconfig persistence. The implementation is done when each port has a Controller Mapping screen, mappings persist under the specified inputPort sections, and the QA A/B swap survives restart.
Written by the indexing model from the issue text.
Description
LibretroRetroJoypadButtonToGamepadButton() (raylib-libretro.h) hard-codes the libretro→raylib gamepad button mapping. Users on non-standard controllers, or who prefer swapped A/B/X/Y layouts, have no recourse.
TASKS.md lists "Rebindable gamepad controller inputs" as unchecked. This is distinct from turbo (#291) and multitap (already done).
Suggested Implementation
- Add a
gamepadRemap[MAX_PLAYERS][RETRO_DEVICE_ID_JOYPAD_R3+1]table toLibretroMenu, defaulting to the identity mapping. - Replace the
switchinLibretroRetroJoypadButtonToGamepadButton()with a lookup into this table (or keep it as a fallback default). - Expose a per-port "Controller Mapping" screen in Settings > Input that shows each libretro button and lets the user press a physical button to remap it.
- Persist via
rlconfigunder[inputPort0],[inputPort1], etc.
QA
Swap A and B for port 0. A game that uses B to jump now jumps when the physical A button is pressed. Remap survives restart.
- Dominant language
- C
- Stars
- 38
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
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.
More from RobLoach/raylib-libretro
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
RobLoach/raylib-libretro#331 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
RobLoach/raylib-libretro#288 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
RobLoach/raylib-libretro#111 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RobLoach/raylib-libretro#110 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RobLoach/raylib-libretro#109 ·
All issues in RobLoach/raylib-libretro
Similar issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100