Fix vrapi_getAxis;

This commit is contained in:
bjorn 2019-05-20 15:13:05 -07:00
parent df6b7fc96a
commit e8a8f6718e
1 changed files with 3 additions and 3 deletions

View File

@ -131,15 +131,15 @@ static bool vrapi_isTouched(Device device, DeviceButton button, bool* touched) {
return buttonCheck(bridgeLovrMobileData.updateData.goButtonTouch, device, button, touched);
}
static int vrapi_getAxis(Device device, DeviceAxis axis, float* value) {
static bool vrapi_getAxis(Device device, DeviceAxis axis, float* value) {
if (device != DEVICE_HAND) {
return false;
}
switch (axis) {
case AXIS_TOUCHPAD:
value[0] = (bridgeLovrMobileData.updateData.goTrackpad.x - 160.f) / 160.f, true;
value[1] = (bridgeLovrMobileData.updateData.goTrackpad.y - 160.f) / 160.f, true;
value[0] = (bridgeLovrMobileData.updateData.goTrackpad.x - 160.f) / 160.f;
value[1] = (bridgeLovrMobileData.updateData.goTrackpad.y - 160.f) / 160.f;
return true;
case AXIS_TRIGGER:
value[0] = bridgeLovrMobileData.updateData.goButtonDown ? 1.f : 0.f;