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