Rebased onto main after #150 (`LiveStore` + `build_bindings` + `F10 -> Controls`)
so every setting and keybind runs through the single `LiveStore` / revision
cache with zero duplicate config state on the hot path:
- 1.5s smart vehicle camera auto-center (`AutoCenterMode`: `on`, `auto`, `off`
in `LiveStore` + `controls.ini` `vehicle_auto_center` + `LARP_VEHICLE_AUTO_CENTER`):
holds the vehicle camera free for 1.5s after mouse motion then smoothly
auto-centers (GTA V PC feel). Editable live in classic `F10 -> Controls`
(`off / auto (1.5s) / on`), selectable in new-look `settings/extra.rs`, and
cycled live via `F8` (persisted via `LiveStore`) when the hook is active.
Default remains `on` (stock title behavior).
- Seat-aware & Cinematic-aware driving Handbrake (`handbrake = Space`, live
rebindable in `F10 -> Controls` including Mouse3/4/5 or `Delete` to clear)
when `keyboard_driving = 1`: sends Xbox A (handbrake) and suppresses X on the
shared key during normal driving, while automatically yielding back to Xbox X
and preserving RMB/LMB as LT/RT when GTA VI's Cinematic Camera (`0x098c_1470`,
`0x098c_1478` + `m_RenderState < 3`, or non-`camGameplayDirector` `0x099f_ece8`)
is active so `ENABLE / DISABLE AUTO DRIVE [Space]` and `SPEED 1 / 2 / 3 [RMB] [LMB]`
work directly as prompted.
- Alt + Mouse 360-degree Right-Stick mode (`right_stick_mouse = Alt`, live
rebindable in `F10 -> Controls`, guarded against Alt+Enter/Alt+Tab and cleared
on capture release) under `LARP_MOUSE_CAMERA=direct` for carjacking,
lockpicking, and fishing minigames, plus circular unit-length normalization
on I/J/K/L diagonal right-stick inputs.
- Cached radial-wheel & `WM_INPUT` map-open hints with 50 ms staleness guards
so high-polling mouse input stays fast without risking stale state in hybrid
controller + mouse sessions.
- Rewrite copy_runs with a sort-and-cluster fast path (thread-local scratch, generation-tagged run map, zero-alloc Spans::add) plus 2,000-case fuzz test against the reference implementation, cutting copy_runs from ~3.0-4.1 ms/f to ~0.05-0.50 ms/f.
- Add lock-free HAS_COPIES/NEXT_REST fast path to pieces::take and offload settled D3D12 buffer/span drops outside STATE via host::reap_now.
- Switch watch::JOURNAL to RwLock with atomic KEPT short-circuit for redundant ask_ahead/ask_ahead_done calls and 4 KiB -> 64 KiB page deduplication.
- Replace SipHash HashMap/HashSet with FastMap/FastSet and reuse thread-local scratch containers across host::preparing, shadow, pieces, and texevents.
Rebased onto main (preserving keyboard_driving, taps, and maps_keys()
handoff) and adds a live Controls tab to the F10 settings overlay backed
by controls.ini:
- Live toggles/tuning (enabled, look sensitivity, invert_y, wheel_invert,
vehicle_auto_center) plus '[' / ']' live sensitivity hotkeys while
captured and comment-preserving upsert_ini_key persistence.
- Live key rebinding for all controls (keyboard keys plus Mouse3/4/5),
Delete to unbind, Esc to cancel, and Standard / Standard FPS presets.
- Dedicated 1-button Focus / Special (LS+RS) binding (`focus = CapsLock`
by default, rebindable to Mouse4/Mouse5/any key; suppresses default
hardcoded Mouse4=LB / Mouse5=RB / Mouse3=RS only when explicitly bound
so default upstream mouse buttons stay unchanged).
- Lock-free CONFIG_REV thread-local snapshot cache and AtomicBool
settings::is_open() so hot paths never contend on mutexes.
CS_ProjDecalResolve_Scalarized took, for a quad lane in the loop that failed
the decal's box test, the registers the pass's head wrote (0, cz, cx, cy, a
half of the decal's dword 0xd0 + P) as its texture coordinate for the coarse
derivatives. Those are world positions, not coordinates: at render widths
that are not a multiple of 128 (3440 x 1440 native, 2288 x 960 under DLSS
quality at 3440) the ground showed black 8 x 8 tiles. Now such a lane gives
the coordinate projected at its own position for this decal, as
c4183d3cbee28e8e (the vectorized resolve) already does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>