Skip to content

Running sway hold, HRDCfix sleep fix, quicksave button and other input options - #7

Merged
farmerarmor merged 9 commits into
farmerarmor:mainfrom
BuckleBean:comfort-input-batch
Sep 21, 2026
Merged

farmerarmor merged 9 commits into
farmerarmor:mainfrom
BuckleBean:comfort-input-batch

Conversation

@BuckleBean

Copy link
Copy Markdown
Contributor

Branch comfort-input-batch, nine commits on main (8ed7288, v0.3.0). Each commit builds on its own with MSVC 14.51 and no warnings. Everything is opt-in: new options default off, or leave behavior unchanged, except where noted. The weapon wheel fix is not included; it is still PR #5 on its own and merges cleanly alongside this.

Tested on Steam DXHRDC 2.0.66.0, Quest 3 over Virtual Desktop (VDXR), RTX 5070 Ti.

Camera

SideSwayHoldMs: keep the camera on the player's path while running. Default 0 (off). While running (full stick, not sprinting), the game sways the camera side to side relative to the player's own origin, about 1 cm peak to peak, at the stride and step rates, while the body travels straight. Existing comfort options already remove heading swing, roll, pitch and eye-height bob, so this sway was the one motion that still reached the headset. With 667 (one stride), the VR camera sits at the player's origin plus the camera's average offset over the last 667 ms. On a recorded trace this cut the stride sway from ±0.36/±0.50 cm to ±0.05/±0.06 cm. It also removed the camera's step-by-step forward/back surge relative to the body. Offsets over 15 cm (camera cuts, cover) pass through. The correction is capped at 4 cm from the game camera, so deliberate camera moves never lag. Tested in-headset. The cap was checked against the trace: it limits the correction on 0.23% of running frames and changes nothing measurable there. Cover was not specifically tested.

SleepFix: the stutter fix from HRDCfix by imring (MIT), applied from the mod. Default 0. A wait loop at 0x54c800 calls Sleep(1). The game never raises the timer resolution, so each call can last a full ~15.6 ms tick. The one-byte patch makes it Sleep(0). Applying it here avoids HRDCfix's DX11 ASI loader, which installs as d3d11.dll and would replace this mod's proxy. The loop's bytes are compared first (skipping the relocated import address), and the Camera hooks log line reports sleepFix=1 only if the patch was applied. In-headset, a save point that hitched badly before stopped hitching with it on. That's a subjective report, not a measurement.

Input

QuickSave button target. The game's quicksave is the fixed F5 key, with no gamepad binding, so [Buttons] couldn't reach it. The new target presses F5 by scan code while the target is held. Example: LeftXHoldMs=500 with LeftXTap=QuickSave, so a tap quicksaves and a hold still pauses. F5 is sent only while the game is the foreground window. It is released when the target ends, input stops, focus is lost, or polling stops, and each press is logged to DeusExHRVR-input.log. Confirmed working in-game. F8 quickload is not included, because F8 is the mod's own capture key.

RightStickUp / RightStickDown with smooth turn. These used to work only with SnapTurn=1. With SnapTurn=0, setting either one now takes the right stick's vertical axis for those buttons and leaves horizontal for smooth turning. A push inside the 30° vertical cone also holds the turn, so jumping or crouching doesn't drift the view. The gameplay check is the same as snap turn's, so menus, terminals and the scope keep the native stick (with PR #5, the weapon wheel too). Nothing changes unless one of the keys is set. Requested on Discord ("i hate snap turn"). Confirmed in-headset with SnapTurn=0.

SnapTurnHideQuickBar: snap turn turns on the game's quickbar auto-hide. Default 1, but it acts only when SnapTurn=1, and snap turn itself defaults off. Snap turn's injected mouse move brings up the game's keyboard-and-mouse quickbar. The game's own auto-hide (g_quickBarAutoHide, the tilde key) keeps it hidden, but players in a headset can't reach tilde. Before writing anything, the mod checks the setting's registration at 0xa68190: the pushes, the relocated value, name and object pointers, the name string, and the object's stored value pointer. It then sets that byte to 1 each time gameplay starts, and logs what it found. Turning the setting on by hand stopped the flash in-headset. On the live game, the mod's check passed and read back the player's saved value (found=1).

LeftStickClickDelayMs. Default 150, which is v0.3.0's calibration-chord grace period, unchanged. 0 sends the left click at once, for layouts that map the left click to something other than crouch (sprint, for example, where the delay only makes sprint late). The value survives Mapper::Reset(), and it's logged to DeusExHRVR.log as Left stick click delay: N ms. Played in-headset at 0. The calibration gesture has not been tried at 0: the chord is detected before the delay applies, so the expected cost is one stray left-click as the chord starts.

Docs

README gets a "Remapping buttons" section: a short step-by-step, with the existing [Buttons] / [ScreenButtons] reference moved under it, after the snap turn docs, in the original wording. It also lists RightStickUp / RightStickDown and QuickSave, and notes that the left menu button isn't remappable. The README and example INI document every new option.

🤖 Generated with Claude Code

BuckleBean and others added 9 commits September 21, 2026 12:42
v0.3.0 delays the left stick click by 150 ms so the two-stick weapon
calibration chord doesn't also crouch. Layouts that move crouch off the
left click pay that delay on every press for no benefit.

[VR] LeftStickClickDelayMs sets it (default 150, the current behavior;
0 sends the click at once; clamped to 0-1000). The value is a setting,
not mapper state, so it survives Mapper::Reset(), which runs on every
calibration chord and focus loss. The companion logs the value it loaded.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
RightStickUp and RightStickDown only worked with SnapTurn=1, because the
code lived inside SnapTurn(). Players who dislike snap turn asked for jump
and crouch on the stick too.

With SnapTurn=0, setting either key now takes the right stick's vertical
axis during gameplay and leaves the horizontal axis for smooth turning. It
uses the same 30-degree cone as snap turn, and a push inside the cone also
holds the turn so a jump or crouch doesn't drift the view. The gameplay
check is the one snap turn uses, so menus, terminals, the scope and the
weapon wheel keep the native stick. Nothing changes unless a key is set.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Measured over two 46 s runs: the game sways the camera sideways relative
to the player entity at the stride (667 ms) and step (333 ms) rates, about
1 cm peak to peak, while the entity itself travels straight. Every other
axis of the run animation (heading, roll, pitch, height) was already
removed before the headset; this one passed through because the mod never
touched horizontal position.

[VR] SideSwayHoldMs (default 0, off) places the VR camera at the entity
origin plus the camera's offset averaged over that many milliseconds; 667
is one running stride. The offset barely changes while moving, so the
average cancels the sway without lag. Simulated on the trace: stride sway
+/-0.36-0.50 cm -> +/-0.05-0.06 cm, step sway +/-0.28-0.45 -> +/-0.01-0.09.
Offsets past 15 cm (camera cuts, cover) pass through and the correction
eases out at 50 cm/s instead of popping; loads, teleports and pauses reset
it like the other filters. The Camera hooks log line reports the setting.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The hold could lag a slow deliberate camera move (a gradual pull-back
into cover) by up to the 15 cm pass-through limit before letting go.
Clamp the correction to 12 units (4 cm) so the VR camera never trails
the game's camera by more than that, whatever the transition.

Simulated on the 2026-09-21 trace: running corrections have a 99th
percentile of 3.4 cm, the cap binds on 0.23% of running frames, and the
stride/step residuals are unchanged. Also measured: most of the
correction is forward (RMS ~1.8 cm) - the game camera surges ahead of
and behind the body each step, and the held output is as smooth as the
body (forward-speed jitter +/-0.39 m/s vs the camera's +/-0.7).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
HRDCfix (github.com/imring/HRDCfix, MIT, by imring) fixes a stutter in
the Director's Cut: a spin-wait at 0x54c800 loops on Sleep(1) while a busy
flag is set. The game never calls timeBeginPeriod, so each Sleep(1) can
last a whole ~15.6 ms timer tick. Changing the push to Sleep(0) makes it
only yield.

[VR] SleepFix (default 0) applies that one-byte patch from the VR mod
instead of HRDCfix's DX11 ASI loader, which installs as d3d11.dll and
would replace the mod's own proxy. The loop's bytes are compared first
(except the four relocated import-address bytes), and Install() only runs
on the supported executable. The Camera hooks log line reports sleepFix=1
when the patch was applied.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Snap turn's injected mouse move brings up the game's keyboard-and-mouse
quickbar. The game's own auto-hide setting (g_quickBarAutoHide, toggled with
the tilde key) keeps it hidden, and players in VR can't reach tilde. With
SnapTurn=1 the mod sets that byte to 1 each time gameplay starts; the
setting's registration, name string and value pointer are checked against
the supported build first. SnapTurnHideQuickBar=0 leaves it to the player.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adds a "Remapping buttons" heading with a short step-by-step, moves the
[Buttons]/[ScreenButtons] reference under it after the snap turn docs, lists
RightStickUp/RightStickDown among the inputs, and notes that the left menu
button isn't remappable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The game's quicksave is a fixed keyboard key (F5) with no gamepad binding,
so [Buttons] couldn't reach it. New target QuickSave presses F5 by scan code
while the target is held (e.g. LeftXHoldMs=500 with LeftXTap=QuickSave:
tap quicksaves, hold still pauses). The key is only pressed while the game
is the foreground window, and it is released when the target ends, input
stops, focus is lost, or the game stops polling the controller. Each press
and release is logged to DeusExHRVR-input.log.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@farmerarmor
farmerarmor merged commit a8fae63 into farmerarmor:main Sep 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants