Staturate haptics amplitude to 1.0

This commit is contained in:
Patrick Nicolas committed 2024-03-15 18:55:39 +01:00
1 parent f2dc24c316
commit 2afd2ff86a
1 file changed
+1 -1
+1 -1
View File
@@ -84,7 +84,7 @@ void scenes::stream::operator()(to_headset::haptics && haptics)
return;
if (haptics.amplitude > 0)
application::haptic_start(action, XR_NULL_PATH, haptics.duration.count(), haptics.frequency, haptics.amplitude);
application::haptic_start(action, XR_NULL_PATH, haptics.duration.count(), haptics.frequency, std::min(1.0f, haptics.amplitude));
else
application::haptic_stop(action, XR_NULL_PATH);
}