Fixed movement stopping on gamepads when button is pressed

This commit is contained in:
Maximilian Giller 2023-06-10 14:47:47 +02:00
parent cdc8fedfeb
commit 4dae13150f

View file

@ -60,7 +60,9 @@ struct InputIdentity
{ {
current_actions.insert(action); current_actions.insert(action);
} }
direction.add(button.direction); if (button.direction != HardDirection::NONE) {
direction.add(button.direction);
}
} }
void release(const ButtonConfig &button) void release(const ButtonConfig &button)
@ -69,7 +71,9 @@ struct InputIdentity
{ {
current_actions.erase(action); current_actions.erase(action);
} }
direction.remove(button.direction); if (button.direction != HardDirection::NONE) {
direction.remove(button.direction);
}
} }
void update() void update()