Skip to content

Commit 7336bf5

Browse files
committed
Expand AndroidDeviceCapabilities.vibratorCount
1 parent 8082c69 commit 7336bf5

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

Packages/com.unity.inputsystem/InputSystem/Plugins/Android/AndroidGameController.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ internal struct AndroidDeviceCapabilities
117117
public bool isVirtual;
118118
public AndroidAxis[] motionAxes;
119119
public AndroidInputSource inputSources;
120+
public int vibratorCount;
120121

121122
public string ToJson()
122123
{
@@ -132,8 +133,18 @@ public static AndroidDeviceCapabilities FromJson(string json)
132133

133134
public override string ToString()
134135
{
135-
return
136-
$"deviceDescriptor = {deviceDescriptor}, productId = {productId}, vendorId = {vendorId}, isVirtual = {isVirtual}, motionAxes = {(motionAxes == null ? "<null>" : String.Join(",", motionAxes.Select(i => i.ToString()).ToArray()))}, inputSources = {inputSources}";
136+
var entries = new[]
137+
{
138+
$"deviceDescriptor: {deviceDescriptor}",
139+
$"productId: {productId}",
140+
$"vendorId: {vendorId}",
141+
$"isVirtual: {isVirtual}",
142+
$"motionAxes: {(motionAxes == null ? "<null>" : String.Join(",", motionAxes.Select(i => i.ToString()).ToArray()))}",
143+
$"inputSources: {inputSources}",
144+
$"vibratorCount: {vibratorCount}"
145+
};
146+
147+
return string.Join(", ", entries);
137148
}
138149
}
139150
}

0 commit comments

Comments
 (0)