mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Simplify InputDefault::joy_axis code by using float instead of struct JoyAxis
This commit is contained in:
parent
4cadd50f0e
commit
949ea2b326
16 changed files with 73 additions and 141 deletions
|
|
@ -40,10 +40,7 @@ void AndroidInputHandler::process_joy_event(const JoypadEvent &p_event) {
|
|||
input->joy_button(p_event.device, p_event.index, p_event.pressed);
|
||||
break;
|
||||
case JOY_EVENT_AXIS:
|
||||
InputDefault::JoyAxis value;
|
||||
value.min = -1;
|
||||
value.value = p_event.value;
|
||||
input->joy_axis(p_event.device, p_event.index, value);
|
||||
input->joy_axis(p_event.device, p_event.index, p_event.value);
|
||||
break;
|
||||
case JOY_EVENT_HAT:
|
||||
input->joy_hat(p_event.device, p_event.hat);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue