From 2fa11429878856bcb8757e3868869acb1c72d52c Mon Sep 17 00:00:00 2001 From: "Randall E. Barker" Date: Thu, 2 May 2019 17:32:22 -0700 Subject: [PATCH] Upgrade to WaveVR SDK 3.0.2 (#1139) --- app/src/wavevr/cpp/native-lib.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/wavevr/cpp/native-lib.cpp b/app/src/wavevr/cpp/native-lib.cpp index a3bb09b74..bfad12b5a 100644 --- a/app/src/wavevr/cpp/native-lib.cpp +++ b/app/src/wavevr/cpp/native-lib.cpp @@ -50,6 +50,16 @@ int main(int argc, char *argv[]) { return 1; } + WVR_InputAttribute inputIdAndTypes[] = { + {WVR_InputId_Alias1_Menu, WVR_InputType_Button, WVR_AnalogType_None}, + {WVR_InputId_Alias1_Touchpad, WVR_InputType_Button | WVR_InputType_Touch | WVR_InputType_Analog, WVR_AnalogType_2D}, + {WVR_InputId_Alias1_Trigger, WVR_InputType_Button , WVR_AnalogType_None}, + {WVR_InputId_Alias1_Digital_Trigger, WVR_InputType_Button , WVR_AnalogType_None} + }; + WVR_SetInputRequest(WVR_DeviceType_HMD, inputIdAndTypes, sizeof(inputIdAndTypes) / sizeof(*inputIdAndTypes)); + WVR_SetInputRequest(WVR_DeviceType_Controller_Right, inputIdAndTypes, sizeof(inputIdAndTypes) / sizeof(*inputIdAndTypes)); + WVR_SetInputRequest(WVR_DeviceType_Controller_Left, inputIdAndTypes, sizeof(inputIdAndTypes) / sizeof(*inputIdAndTypes)); + // Must initialize render runtime before all OpenGL code. WVR_RenderInitParams_t param; param = { WVR_GraphicsApiType_OpenGL, WVR_RenderConfig_Timewarp_Asynchronous };