Make splay axis 1D;

This commit is contained in:
bjorn 2020-02-13 15:18:12 -08:00
parent a0c7d0235f
commit e218733ee2
2 changed files with 3 additions and 4 deletions

View File

@ -469,7 +469,7 @@ static const int axisCounts[MAX_AXES] = {
[AXIS_TOUCHPAD] = 2,
[AXIS_GRIP] = 1,
[AXIS_CURL] = 1,
[AXIS_SPLAY] = 2,
[AXIS_SPLAY] = 1,
[AXIS_PINCH] = 1
};

View File

@ -466,9 +466,8 @@ static bool openvr_getAxis(Device device, DeviceAxis axis, vec3 value) {
if (axis == AXIS_CURL) {
value[0] = summary.flFingerCurl[finger];
return true;
} else if (axis == AXIS_SPLAY) {
value[0] = finger > 0 ? summary.flFingerSplay[finger - 1] : 0.f;
value[1] = finger < 4 ? summary.flFingerSplay[finger - 0] : 0.f;
} else if (axis == AXIS_SPLAY && finger < 4) {
value[0] = summary.flFingerSplay[finger];
return true;
}