1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Use mouse and joypad enums instead of plain integers

Also MIDIMessage
This commit is contained in:
Aaron Franke
2021-03-25 16:56:12 -04:00
parent e919d894f8
commit 0ce49800ac
38 changed files with 188 additions and 181 deletions

View File

@@ -412,7 +412,7 @@ void GDAPI godot_xr_set_controller_button(godot_int p_controller_id, godot_int p
if (tracker.is_valid()) {
int joyid = tracker->get_joy_id();
if (joyid != -1) {
input->joy_button(joyid, p_button, p_is_pressed);
input->joy_button(joyid, (JoyButton)p_button, p_is_pressed);
}
}
}
@@ -431,7 +431,7 @@ void GDAPI godot_xr_set_controller_axis(godot_int p_controller_id, godot_int p_a
Input::JoyAxisValue jx;
jx.min = p_can_be_negative ? -1 : 0;
jx.value = p_value;
input->joy_axis(joyid, p_axis, jx);
input->joy_axis(joyid, (JoyAxis)p_axis, jx);
}
}
}