From ab9a48d7501a4a7305943a4fcadb2194a640550b Mon Sep 17 00:00:00 2001 From: Lubos Date: Tue, 26 Jul 2022 17:44:38 +0200 Subject: [PATCH] OpenXR - Static added to global variables --- android/jni/app-android.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 };