Repository navigation
Native remapper, USB pad profiles and the pad_mapper service - #1
Merged
Merged
Conversation
Replace the shell flow (raw evdev bytes, PNG prompts, reboot to apply) with gamepad_remapper, built on the Options Menu framework. It reads the Clovercon through SDL, so every binding uses the indices Canoe and Kachikachi see, lists the current mapping, remaps one button or all of them with skip-on-timeout, and applies on save by binding the new gamecontrollerdb.txt over /etc/sdl2, with no reboot. Restore defaults undoes it. The entry moves to Advanced Options > Controller. Build and release through hmod-build, with the Options Menu, toolchain and hmod-build submodules.
pad_mapper grabs each USB pad that has a map in inputs/pads/, translates its raw buttons, hats and axes, and injects them into the virtual Clovercon hakchi made for it, so games keep their player slots and the front pads are untouched. It sends Home on the pad's Down+Select when the Home Combo is on. The remapper now starts by picking the front ports or a USB pad by its real name, and captures USB pads raw.
pad_mapper falls back to inputs/profiles/<vendor>_<product>.map when a pad has no saved map, so a DualShock 4 works on plug-in (and the Xbox 360 profile, untested). Restore defaults on a USB pad goes back to its profile. The list and the last-capture line show button names (Cross, L1, D-Pad Up, the Clovercon button for front-port bindings) instead of raw codes. The readmes get screenshots of both views.
pad_mapper rebuilds its translators when a grabbed pad goes away, and the controller row trims the leading separator some pads put in their name.
Axis capture measures from the center, so D-pads reported as axes are detected, and PlayStation Classic buttons and D-pad are shown by name.
The DualShock 4 and PlayStation Classic profiles now use Triangle = X and Square = Y as well.
…it against the OM libstdc++
…efresh the screenshots
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pad_mapper, a background service that translates USB pads into the virtual front-port controller, with per-model mappings and ready-made profiles (DualShock 4, PlayStation Classic, Xbox 360, Krom Kumite)pad_mapperis paused only while a button is being captured, so a USB pad can still navigate the menupad_mapperagainst the Options Menu's private libstdc++ (needed with RetroArch 1.8.4 Xtreme SC)Tested on the console with a DualShock 4, a wired Xbox 360 controller, a Krom Kumite stick and a Wii Classic Controller in the front port.