summaryrefslogtreecommitdiff
path: root/scene/3d/arvr_nodes.cpp
diff options
context:
space:
mode:
authorAndreas Haas <Hinsbart@users.noreply.github.com>2017-09-15 10:33:48 +0200
committerGitHub <noreply@github.com>2017-09-15 10:33:48 +0200
commit6b729726e0c848e2a60eb72782315a883526c913 (patch)
treef09391110b412666edbaa9e2ae3c7bb1eec30746 /scene/3d/arvr_nodes.cpp
parent7dffed485bb6e824335de96bffc79ea58a2de576 (diff)
parentc46b8f444a5f6f0c958c0c3ec2c4e5a99e1f1d70 (diff)
Merge pull request #11280 from BastiaanOlij/fix_arvr_joyid
joyid is set to -1, not 0 when no joystick entity has been created
Diffstat (limited to 'scene/3d/arvr_nodes.cpp')
-rw-r--r--scene/3d/arvr_nodes.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/3d/arvr_nodes.cpp b/scene/3d/arvr_nodes.cpp
index 966dd88a2c..147d3bf115 100644
--- a/scene/3d/arvr_nodes.cpp
+++ b/scene/3d/arvr_nodes.cpp
@@ -184,7 +184,7 @@ int ARVRController::get_joystick_id() const {
int ARVRController::is_button_pressed(int p_button) const {
int joy_id = get_joystick_id();
- if (joy_id == 0) {
+ if (joy_id == -1) {
return false;
};
@@ -193,7 +193,7 @@ int ARVRController::is_button_pressed(int p_button) const {
float ARVRController::get_joystick_axis(int p_axis) const {
int joy_id = get_joystick_id();
- if (joy_id == 0) {
+ if (joy_id == -1) {
return 0.0;
};