Skip to content

Commit

Permalink
fix(client_openxr): 🐛 Fix crash with vibration on Focus 3 (alvr-org#2324
Browse files Browse the repository at this point in the history
)
  • Loading branch information
zmerp authored and failboat committed Aug 17, 2024
1 parent c9cd1c0 commit a8e1c94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions alvr/client_openxr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ pub fn entry_point() {
&xr_session,
xr::Path::NULL,
&xr::HapticVibration::new()
.amplitude(amplitude)
.frequency(frequency)
.amplitude(amplitude.clamp(0.0, 1.0))
.frequency(frequency.max(0.0))
.duration(xr::Duration::from_nanos(duration.as_nanos() as _)),
)
.unwrap();
Expand Down

0 comments on commit a8e1c94

Please sign in to comment.