Repository navigation
v20261125-c1d-controller-mapping-test
Pre-release
Pre-release
·
85 commits
to main
since this release
Controller Mapping Test — chunk C1d: capture every button, D-pad direction,
stick axis and trigger for the selected controller, persist it per device, and
reload it on start.
What's in it
- Mapping flow: main menu → Controller → Map Controller, then follow 21
prompts. Cancel aborts; selection, Load and Save are locked while mapping. - Capture rules: buttons record on release after a short settle; stick axes must
move past half travel and return to center before they count; triggers accept either
a digital button or an analog pull; D-pad records the hat direction when the pad has
one, otherwise the pressed button. - Persistence: captured values live in
controller.cfgbesidehotkeys.cfg,
keyed by the controller GUID (button:N,axis:N:min:max,hat:H:bits); finishing
auto-saves, and Load restores them. - Noise filtering: only axes bound to the standard controller axes are mappable,
so gyroscope/accelerometer-style axes cannot be selected; sensor events are ignored
and sensors are disabled at open. - Window: wider layout, live prompt with step counter, per-step list with the
current step highlighted.
Fixed
- Triggers would not map: SDL reports them from
-32767(released) to+32767
(fully pulled), so the baseline-relative delta overflowedint16_tand never passed
the engagement threshold. The delta is now computed inint; verified across
Bluetooth and 2.4 GHz X-input pads.
Verified
Full mapping (all 21 steps, including both triggers) completed by hand on Linux
x86_64, Windows under Wine, and Android arm64-v8a (Galaxy S25 Ultra).
Assets
| Asset | Size |
|---|---|
openttd-20261125-main-gd21dd0fe84-linux-x86_64.zip |
~11 MB |
openttd-20261125-main-gd21dd0fe84-win64.zip |
~17.6 MB |
openttd-20261125-main-gd21dd0fe84-android-arm64-v8a-debug.apk |
~91.6 MB |
Pre-release; C1e adds live visual feedback for pressed controls.