upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/scripts/windows-boot/crash_monitor.cpp
diff options
context:
space:
mode:
authorOreoFR <29048345+OreoFR@users.noreply.github.com>2026-12-03 03:27:23 +0100
committerOreoFR <29048345+OreoFR@users.noreply.github.com>2026-12-03 03:27:23 +0100
commitc179023f9c0d1df4d55c845eeada9b0bb874501f (patch)
tree2894c7c7d3e67307f51bed37260b1ebf8e25f132 /scripts/windows-boot/crash_monitor.cpp
parent94950d4a5751e0b6bfa4efdd12c4365dab990b32 (diff)
d3d12 gameinput: kbm binds read F144/Numpad160 without overflow; leaving a vehicle by hand follows the remap
merzleckeier's review of 94950d4a5: - key_named used `then_some(VK_F1 + n - 1)` and `then_some(VK_NUMPAD0 + digit)`, which add before the range check: F144 or Numpad160 overflowed u8 (a panic with overflow checks) instead of an "unknown key" warning. Now `then(|| ...)`. - With no context measured, Caps Lock's driving table ended on the physical F, so `vehicle:F=RB` left driving and gave no RB. It now ends on a key just pressed that is the pad's Y in the driving table (F unless remapped; Binds::exit_pressed). A key that is Y on foot too switches at once, as F did; one that is another input on foot keeps the driving table while held (`leaving`), so its Y reaches the title, and the on-foot table comes when it is let go. Caps Lock or a measured context drops `leaving`. Tests: four out-of-range names in bind_entries_read (F144, F255, Numpad160, Num250); leaving_a_vehicle_by_hand_follows_the_remap (vehicle:F=RB stays RB and driving; both:G=Y leaves at once with Y; G Y in a vehicle and RB on foot holds Y until let go, then on-foot W is the stick and G is RB; Caps Lock while leaving drops it). cargo test -p leonida-hle 258 passed, 2 ignored; clippy -D warnings clean. With the old then_some and the physical-F rule both tests fail (overflow panic, vehicle:F=RB leaving). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'scripts/windows-boot/crash_monitor.cpp')
0 files changed, 0 insertions, 0 deletions