mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:37:51 +02:00
Use Odyssey controller extension, might fix?
This commit is contained in:
parent
bd95779fb8
commit
23364f05f8
2 changed files with 27 additions and 0 deletions
|
@ -96,6 +96,7 @@ bool OpenXrContext::initInstance() {
|
||||||
|
|
||||||
bool openglSupported = false;
|
bool openglSupported = false;
|
||||||
bool userPresenceSupported = false;
|
bool userPresenceSupported = false;
|
||||||
|
bool odysseyControllerSupported = false;
|
||||||
|
|
||||||
qCInfo(xr_context_cat, "Runtime supports %d extensions:", count);
|
qCInfo(xr_context_cat, "Runtime supports %d extensions:", count);
|
||||||
for (uint32_t i = 0; i < count; i++) {
|
for (uint32_t i = 0; i < count; i++) {
|
||||||
|
@ -104,6 +105,8 @@ bool OpenXrContext::initInstance() {
|
||||||
openglSupported = true;
|
openglSupported = true;
|
||||||
} else if (strcmp(XR_EXT_USER_PRESENCE_EXTENSION_NAME, properties[i].extensionName) == 0) {
|
} else if (strcmp(XR_EXT_USER_PRESENCE_EXTENSION_NAME, properties[i].extensionName) == 0) {
|
||||||
userPresenceSupported = true;
|
userPresenceSupported = true;
|
||||||
|
} else if (strcmp(XR_EXT_SAMSUNG_ODYSSEY_CONTROLLER_EXTENSION_NAME, properties[i].extensionName) == 0) {
|
||||||
|
odysseyControllerSupported = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,10 +116,15 @@ bool OpenXrContext::initInstance() {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<const char*> enabled = {XR_KHR_OPENGL_ENABLE_EXTENSION_NAME};
|
std::vector<const char*> enabled = {XR_KHR_OPENGL_ENABLE_EXTENSION_NAME};
|
||||||
|
|
||||||
if (userPresenceSupported) {
|
if (userPresenceSupported) {
|
||||||
enabled.push_back(XR_EXT_USER_PRESENCE_EXTENSION_NAME);
|
enabled.push_back(XR_EXT_USER_PRESENCE_EXTENSION_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (odysseyControllerSupported) {
|
||||||
|
enabled.push_back(XR_EXT_SAMSUNG_ODYSSEY_CONTROLLER_EXTENSION_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
XrInstanceCreateInfo info = {
|
XrInstanceCreateInfo info = {
|
||||||
.type = XR_TYPE_INSTANCE_CREATE_INFO,
|
.type = XR_TYPE_INSTANCE_CREATE_INFO,
|
||||||
.applicationInfo = {
|
.applicationInfo = {
|
||||||
|
|
|
@ -468,6 +468,25 @@ bool OpenXrInputPlugin::InputDevice::initActions() {
|
||||||
{"right_pose", hand_right + "/grip/pose"},
|
{"right_pose", hand_right + "/grip/pose"},
|
||||||
{"right_haptic", "/user/hand/right/output/haptic"},
|
{"right_haptic", "/user/hand/right/output/haptic"},
|
||||||
}},
|
}},
|
||||||
|
{"/interaction_profiles/samsung/odyssey_controller", {
|
||||||
|
{"left_secondary_click", hand_left + "/menu/click"},
|
||||||
|
{"left_squeeze_value", hand_left + "/squeeze/click"},
|
||||||
|
{"left_trigger_value", hand_left + "/trigger/value"},
|
||||||
|
{"left_thumbstick", hand_left + "/thumbstick"},
|
||||||
|
{"left_thumbstick_click", hand_left + "/trackpad/click"},
|
||||||
|
{"left_thumbstick_touch", hand_left + "/trackpad/touch"},
|
||||||
|
{"left_pose", hand_left + "/grip/pose"},
|
||||||
|
{"left_haptic", "/user/hand/left/output/haptic"},
|
||||||
|
|
||||||
|
{"right_secondary_click", hand_right + "/menu/click"},
|
||||||
|
{"right_squeeze_value", hand_right + "/squeeze/click"},
|
||||||
|
{"right_trigger_value", hand_right + "/trigger/value"},
|
||||||
|
{"right_thumbstick", hand_right + "/thumbstick"},
|
||||||
|
{"right_thumbstick_click", hand_right + "/trackpad/click"},
|
||||||
|
{"right_thumbstick_touch", hand_right + "/trackpad/touch"},
|
||||||
|
{"right_pose", hand_right + "/grip/pose"},
|
||||||
|
{"right_haptic", "/user/hand/right/output/haptic"},
|
||||||
|
}},
|
||||||
{"/interaction_profiles/valve/index_controller", {
|
{"/interaction_profiles/valve/index_controller", {
|
||||||
{"left_primary_click", hand_left + "/a/click"},
|
{"left_primary_click", hand_left + "/a/click"},
|
||||||
{"left_secondary_click", hand_left + "/b/click"},
|
{"left_secondary_click", hand_left + "/b/click"},
|
||||||
|
|
Loading…
Reference in a new issue