mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 18:46:18 +00:00
d/steamvr_lh: Add vive and index bindings
This commit is contained in:
parent
bd276ff437
commit
ceae41a7bd
|
@ -83,7 +83,6 @@ protected:
|
|||
|
||||
private:
|
||||
vr::ITrackedDeviceServerDriver *driver;
|
||||
std::vector<xrt_binding_profile> binding_profiles_vec;
|
||||
uint64_t current_frame{0};
|
||||
|
||||
std::mutex frame_mutex;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "interfaces/context.hpp"
|
||||
#include "device.hpp"
|
||||
#include "util/u_device.h"
|
||||
#include "vive/vive_bindings.h"
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -212,6 +213,22 @@ Context::setup_controller(const char *serial, vr::ITrackedDeviceServerDriver *dr
|
|||
CTX_ERR("Activating controller failed: error %u", err);
|
||||
return false;
|
||||
}
|
||||
|
||||
enum xrt_device_name name = controller[device_idx]->name;
|
||||
switch (name) {
|
||||
case XRT_DEVICE_VIVE_WAND:
|
||||
controller[device_idx]->binding_profiles = vive_binding_profiles_wand;
|
||||
controller[device_idx]->binding_profile_count = vive_binding_profiles_wand_count;
|
||||
break;
|
||||
|
||||
break;
|
||||
case XRT_DEVICE_INDEX_CONTROLLER:
|
||||
controller[device_idx]->binding_profiles = vive_binding_profiles_index;
|
||||
controller[device_idx]->binding_profile_count = vive_binding_profiles_index_count;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue