summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2017-10-19 23:35:44 +1100
committerBastiaan Olij <mux213@gmail.com>2017-10-20 00:28:17 +1100
commit914c4d30668af7d7ad3c18cb2ec9f4d4b992b7bf (patch)
treec9126988c5aeb68f7b7289620eaaf3ffbadda7f9
parent1c1ddc9381c839ee01f8c13581f948d152d54d80 (diff)
Always mixing up binary and and boolean and...
-rw-r--r--scene/3d/arvr_nodes.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/3d/arvr_nodes.cpp b/scene/3d/arvr_nodes.cpp
index c6b6c02129..064a249190 100644
--- a/scene/3d/arvr_nodes.cpp
+++ b/scene/3d/arvr_nodes.cpp
@@ -204,7 +204,7 @@ void ARVRController::_notification(int p_what) {
int mask = 1;
// check button states
for (int i = 0; i < 16; i++) {
- bool was_pressed = (button_states && mask) == mask;
+ bool was_pressed = (button_states & mask) == mask;
bool is_pressed = Input::get_singleton()->is_joy_button_pressed(joy_id, i);
if (!was_pressed && is_pressed) {
@@ -336,6 +336,7 @@ String ARVRController::get_configuration_warning() const {
ARVRController::ARVRController() {
controller_id = 0;
is_active = true;
+ button_states = 0;
};
ARVRController::~ARVRController(){