add extra check for multiplayer device input

This commit is contained in:
2025-02-28 14:27:20 +10:00
parent 48d0318aa3
commit dc24478423
2 changed files with 5 additions and 2 deletions

View File

@@ -46,7 +46,11 @@ func _unhandled_input(event: InputEvent) -> void:
var mode := Inputer.get_event_mode(event)
if (
not input_mode_is(mode)
or (_input_mode == Inputer.Mode.CONTROLLER and event.device != _device_index)
or (
Referencer.players_count > 1
and _input_mode == Inputer.Mode.CONTROLLER
and event.device != _device_index
)
):
return