mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 04:36:07 +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:
|
private:
|
||||||
vr::ITrackedDeviceServerDriver *driver;
|
vr::ITrackedDeviceServerDriver *driver;
|
||||||
std::vector<xrt_binding_profile> binding_profiles_vec;
|
|
||||||
uint64_t current_frame{0};
|
uint64_t current_frame{0};
|
||||||
|
|
||||||
std::mutex frame_mutex;
|
std::mutex frame_mutex;
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include "interfaces/context.hpp"
|
#include "interfaces/context.hpp"
|
||||||
#include "device.hpp"
|
#include "device.hpp"
|
||||||
#include "util/u_device.h"
|
#include "util/u_device.h"
|
||||||
|
#include "vive/vive_bindings.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -212,6 +213,22 @@ Context::setup_controller(const char *serial, vr::ITrackedDeviceServerDriver *dr
|
||||||
CTX_ERR("Activating controller failed: error %u", err);
|
CTX_ERR("Activating controller failed: error %u", err);
|
||||||
return false;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue