Commit 0ca17116 by Bastiaan Olij

ARVRController.is_button_pressed requires to return a boolean

parent d4b31c69
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</description> </description>
</method> </method>
<method name="is_button_pressed" qualifiers="const"> <method name="is_button_pressed" qualifiers="const">
<return type="int"> <return type="bool">
</return> </return>
<argument index="0" name="button" type="int"> <argument index="0" name="button" type="int">
</argument> </argument>
......
...@@ -300,7 +300,7 @@ int ARVRController::get_joystick_id() const { ...@@ -300,7 +300,7 @@ int ARVRController::get_joystick_id() const {
return tracker->get_joy_id(); return tracker->get_joy_id();
}; };
int ARVRController::is_button_pressed(int p_button) const { bool ARVRController::is_button_pressed(int p_button) const {
int joy_id = get_joystick_id(); int joy_id = get_joystick_id();
if (joy_id == -1) { if (joy_id == -1) {
return false; return false;
......
...@@ -88,7 +88,7 @@ public: ...@@ -88,7 +88,7 @@ public:
String get_controller_name(void) const; String get_controller_name(void) const;
int get_joystick_id() const; int get_joystick_id() const;
int is_button_pressed(int p_button) const; bool is_button_pressed(int p_button) const;
float get_joystick_axis(int p_axis) const; float get_joystick_axis(int p_axis) const;
real_t get_rumble() const; real_t get_rumble() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment