diff --git a/android/jni/app-android.cpp b/android/jni/app-android.cpp index 305d68f98264..53013337b708 100644 --- a/android/jni/app-android.cpp +++ b/android/jni/app-android.cpp @@ -112,7 +112,7 @@ struct ButtonMapping { } }; -std::vector leftControllerMapping = { +static std::vector leftControllerMapping = { ButtonMapping(NKCODE_BUTTON_X, ovrButton_X), ButtonMapping(NKCODE_BUTTON_Y, ovrButton_Y), ButtonMapping(NKCODE_ALT_LEFT, ovrButton_GripTrigger), @@ -125,7 +125,7 @@ std::vector leftControllerMapping = { ButtonMapping(NKCODE_BACK, ovrButton_Enter), }; -std::vector rightControllerMapping = { +static std::vector rightControllerMapping = { ButtonMapping(NKCODE_BUTTON_A, ovrButton_A), ButtonMapping(NKCODE_BUTTON_B, ovrButton_B), ButtonMapping(NKCODE_ALT_RIGHT, ovrButton_GripTrigger), @@ -137,8 +137,8 @@ std::vector rightControllerMapping = { ButtonMapping(NKCODE_ENTER, ovrButton_Trigger), }; -int controllerIds[] = {DEVICE_ID_XR_CONTROLLER_LEFT, DEVICE_ID_XR_CONTROLLER_RIGHT}; -std::vector controllerMapping[2] = { +static const int controllerIds[] = {DEVICE_ID_XR_CONTROLLER_LEFT, DEVICE_ID_XR_CONTROLLER_RIGHT}; +static std::vector controllerMapping[2] = { leftControllerMapping, rightControllerMapping };