Leave an unchanged SteamVR driver in place when reinstalling

Re-running the installer replaced the ft_pointer driver's files under a
running SteamVR. SteamVR then kept giving the virtual controller its hand
role but ignored its laser claim, so the mouse moved its dot without
SteamVR's laser until SteamVR restarted. The driver is now staged and only
replaced when it changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
DeeJanuzandClaude Opus 5.5 committed 2026-09-26 20:07:35 -06:00
1 parent a4499c1c16
commit f70073b140
2 files changed
+15 -5

No files matched your search

+2
View File
@@ -80,6 +80,8 @@ A few overlays need special handling:
- Just off a panel, the cursor stays on that panel's plane within `POINTER_EDGE_REACH`, so resize margins and window controls just outside the panel are reachable.
- While the left button is held, the cursor keeps the distance it had at the press and stops re-testing collisions, so dragging past a panel's edge doesn't make it jump.
Replacing a loaded driver's files, as re-running the installer used to do, leaves SteamVR honoring the virtual controller's hand role but not its laser claim: the dashboard pointer stays unassigned until SteamVR restarts. The driver installer now leaves an unchanged driver in place.
`dashboard.laserRayWidthScale` controls the beam's width, but SteamVR only applies a change from its own settings screen or at restart, so it can't be switched per device while running.
### Handing the laser back and forth
+13 -5
View File
@@ -18,13 +18,21 @@ reg='/opt/steamvr/bin/linuxarm64/vrpathreg'
case ${1:-install} in
install)
"$root/scripts/sync.sh" >/dev/null
# Replacing the files of a driver SteamVR has loaded leaves its input bindings in a bad
# state (the 3D mouse no longer gets the laser) until SteamVR restarts, so an unchanged
# driver is left alone.
"$frame" --host "set -e; test -f $src/build/driver_ft_pointer.so
rm -rf $dest; mkdir -p $dest/bin/linuxarm64
cp -r $src/ft_pointer/. $dest/
cp $src/build/driver_ft_pointer.so $dest/bin/linuxarm64/
rm -rf $dest.new; mkdir -p $dest.new/bin/linuxarm64
cp -r $src/ft_pointer/. $dest.new/
cp $src/build/driver_ft_pointer.so $dest.new/bin/linuxarm64/
if [ -d $dest ] && diff -r -q $dest $dest.new >/dev/null; then
rm -rf $dest.new; echo 'driver unchanged'
else
rm -rf $dest; mv $dest.new $dest
echo 'installed; restart SteamVR to load it'
fi
LD_LIBRARY_PATH=/opt/steamvr/bin/linuxarm64 $reg adddriver $dest
LD_LIBRARY_PATH=/opt/steamvr/bin/linuxarm64 $reg show | grep -A3 -i 'external'
echo 'installed; restart SteamVR to load it'" ;;
LD_LIBRARY_PATH=/opt/steamvr/bin/linuxarm64 $reg show | grep -A3 -i 'external'" ;;
uninstall)
"$frame" --host "LD_LIBRARY_PATH=/opt/steamvr/bin/linuxarm64 $reg removedriver $dest; rm -rf $dest; echo 'removed; restart SteamVR to unload it'" ;;
send)