Files
BT411/game/reconstructed
CydandClaude Opus 4.8 6a302f3aed Input: bring-up gameplay keys stand down under PadRIO (BT_DEVKEYS)
The hardcoded GetAsyncKeyState gameplay keys in mech4.cpp (WASD drive, 1-4
weapon groups, G config, F5-F9 generators, C valve, M mode, Q/E torso, X
all-stop/recenter) OVERLAP a RIO device's own controls -- with L4CONTROLS=PAD
(or a serial RIO) engaged, every one of them double-fired against the same key
going through the PadRIO bindings.

Gate them behind BT_DEVKEYS: they now stand down whenever a RIO device owns
input (application->GetControlsManager()->rioPointer != 0), so PadRIO's
bindings.txt is the single source of truth. Env override: BT_DEVKEYS=1 forces
them on (hybrid keyboard+pad testing), =0 forces off, unset = auto. Implemented
as a `gfocus` gate (focused AND keys-enabled) replacing `focused` on those
reads; the 'V' cockpit/chase view toggle and the '`' display toggle are
desktop-only conveniences with no RIO equivalent and stay live.

Backward compatible: with no device (keyboard dev mode) gfocus == focused, so
keyboard-only play is unchanged. Boots clean (13 ticks, no faults).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-17 10:37:30 -05:00
..