Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Fix Pico G2 controller touchpad in immersive mode (#3587)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluemarvin committed Jun 30, 2020
1 parent 96aab33 commit abf796f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/src/picovr/cpp/DeviceDelegatePicoVR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,11 @@ struct DeviceDelegatePicoVR::State {
}
} else {
const int32_t kNumAxes = 2;
float axes[kNumAxes] = { controller.axisX , -controller.axisY };
float axes[kNumAxes] = { 0.0f, 0.0f };
if (controller.touched) {
axes[device::kImmersiveAxisTouchpadX] = (2.0f * controller.axisX) - 1.0f;
axes[device::kImmersiveAxisTouchpadY] = (2.0f * controller.axisY) - 1.0f;
}
controllerDelegate->SetAxes(i, axes, controller.index != GazeModeIndex() ? kNumAxes : 0);

if (controller.touched) {
Expand Down

0 comments on commit abf796f

Please sign in to comment.