InputEventJoypadMotion::set_axis - reject invalid axis

This commit is contained in:
LATRio 2021-09-30 19:32:21 +09:00
parent 4a9a231566
commit 41c1cfe28e

View File

@ -864,6 +864,8 @@ void InputEventMouseMotion::_bind_methods() {
///////////////////////////////////
void InputEventJoypadMotion::set_axis(JoyAxis p_axis) {
ERR_FAIL_INDEX(p_axis, JOY_AXIS_MAX);
axis = p_axis;
emit_changed();
}