Fast-path 0-amplitude haptics

This commit is contained in:
Patrick Nicolas
2024-04-05 15:21:12 +02:00
parent 40043d1e45
commit fd6b9f539a
3 changed files with 21 additions and 13 deletions
+4 -4
View File
@@ -132,11 +132,11 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
self->fence = self->device.createFence({.flags = vk::FenceCreateFlagBits::eSignaled});
// Look up the XrActions for haptics
self->haptics_actions[0].first = application::get_action("/user/hand/left/output/haptic").first;
self->haptics_actions[0].second = application::string_to_path("/user/hand/left");
self->haptics_actions[0].action = application::get_action("/user/hand/left/output/haptic").first;
self->haptics_actions[0].path = application::string_to_path("/user/hand/left");
self->haptics_actions[1].first = application::get_action("/user/hand/right/output/haptic").first;
self->haptics_actions[1].second = application::string_to_path("/user/hand/right");
self->haptics_actions[1].action = application::get_action("/user/hand/right/output/haptic").first;
self->haptics_actions[1].path = application::string_to_path("/user/hand/right");
// Look up the XrActions for input
for (const auto & [action, action_type, name]: application::inputs())