Adding vive default mapping

This commit is contained in:
Brad Davis 2015-10-26 10:36:31 -07:00
parent f61cf843bc
commit f38303a9a5
2 changed files with 24 additions and 2 deletions

View file

@ -0,0 +1,22 @@
{
"name": "XBox to Standard",
"channels": [
{ "from": "Vive.LY", "to": "Standard.LY" },
{ "from": "Vive.LX", "to": "Standard.LX" },
{ "from": "Vive.LT", "to": "Standard.LT" },
{ "from": "Vive.LB", "to": "Standard.LB" },
{ "from": "Vive.LS", "to": "Standard.LS" },
{ "from": "Vive.RY", "to": "Standard.RY" },
{ "from": "Vive.RX", "to": "Standard.RX" },
{ "from": "Vive.RT", "to": "Standard.RT" },
{ "from": "Vive.RB", "to": "Standard.RB" },
{ "from": "Vive.RS", "to": "Standard.RS" },
{ "from": "Vive.Back", "to": "Standard.Back" },
{ "from": "Vive.Start", "to": "Standard.Start" },
{ "from": "Vive.A", "to": "Standard.A" },
{ "from": "Vive.B", "to": "Standard.B" }
]
}

View file

@ -45,7 +45,7 @@ const QString MENU_PATH = MENU_PARENT + ">" + MENU_NAME;
const QString RENDER_CONTROLLERS = "Render Hand Controllers"; const QString RENDER_CONTROLLERS = "Render Hand Controllers";
ViveControllerManager::ViveControllerManager() : ViveControllerManager::ViveControllerManager() :
InputDevice("SteamVR Controller"), InputDevice("Vive"),
_trackedControllers(0), _trackedControllers(0),
_modelLoaded(false), _modelLoaded(false),
_leftHandRenderID(0), _leftHandRenderID(0),
@ -313,7 +313,7 @@ void ViveControllerManager::handleButtonEvent(uint32_t button, bool pressed, boo
if (button == vr::k_EButton_ApplicationMenu) { if (button == vr::k_EButton_ApplicationMenu) {
// FIXME? // FIXME?
_buttonPressedMap.insert(left ? controller::A : controller::A); _buttonPressedMap.insert(left ? controller::B : controller::A);
} else if (button == vr::k_EButton_Grip) { } else if (button == vr::k_EButton_Grip) {
// Tony says these are harder to reach, so make them the meta buttons // Tony says these are harder to reach, so make them the meta buttons
_buttonPressedMap.insert(left ? controller::BACK : controller::START); _buttonPressedMap.insert(left ? controller::BACK : controller::START);