Skip to content

Commit 8c27112

Browse files
authored
fix: Take other values than 1 into consideration for pressed buttons (#46)
1 parent 6fc8f5f commit 8c27112

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/gamepads_platform_interface/lib/api/gamepad_state.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class GamepadState {
2020
analogInputs[event.key] = event.value;
2121
break;
2222
case KeyType.button:
23-
buttonInputs[event.key] = event.value == 1;
23+
buttonInputs[event.key] = event.value != 0;
2424
break;
2525
}
2626
}

0 commit comments

Comments
 (0)