Skip to content

Commit

Permalink
OpenXR - Static added to global variables
Browse files Browse the repository at this point in the history
  • Loading branch information
lvonasek committed Jul 26, 2022
1 parent b2509ad commit ab9a48d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions android/jni/app-android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ struct ButtonMapping {
}
};

std::vector<ButtonMapping> leftControllerMapping = {
static std::vector<ButtonMapping> leftControllerMapping = {
ButtonMapping(NKCODE_BUTTON_X, ovrButton_X),
ButtonMapping(NKCODE_BUTTON_Y, ovrButton_Y),
ButtonMapping(NKCODE_ALT_LEFT, ovrButton_GripTrigger),
Expand All @@ -125,7 +125,7 @@ std::vector<ButtonMapping> leftControllerMapping = {
ButtonMapping(NKCODE_BACK, ovrButton_Enter),
};

std::vector<ButtonMapping> rightControllerMapping = {
static std::vector<ButtonMapping> rightControllerMapping = {
ButtonMapping(NKCODE_BUTTON_A, ovrButton_A),
ButtonMapping(NKCODE_BUTTON_B, ovrButton_B),
ButtonMapping(NKCODE_ALT_RIGHT, ovrButton_GripTrigger),
Expand All @@ -137,8 +137,8 @@ std::vector<ButtonMapping> rightControllerMapping = {
ButtonMapping(NKCODE_ENTER, ovrButton_Trigger),
};

int controllerIds[] = {DEVICE_ID_XR_CONTROLLER_LEFT, DEVICE_ID_XR_CONTROLLER_RIGHT};
std::vector<ButtonMapping> controllerMapping[2] = {
static const int controllerIds[] = {DEVICE_ID_XR_CONTROLLER_LEFT, DEVICE_ID_XR_CONTROLLER_RIGHT};
static std::vector<ButtonMapping> controllerMapping[2] = {
leftControllerMapping,
rightControllerMapping
};
Expand Down

0 comments on commit ab9a48d

Please sign in to comment.