Skip to content

Commit 96a8d1b

Browse files
committed
Guard method with macOS platform define
1 parent fd28fa2 commit 96a8d1b

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

Packages/com.unity.inputsystem/InputSystem/Plugins/XInput/XInputSupport.cs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,6 @@ static class XInputSupport
1616
{
1717
public static void Initialize()
1818
{
19-
void RegisterXboxOneWirelessFromProductAndVendorID(int vendorId, int productId)
20-
{
21-
InputSystem.RegisterLayout<XboxOneGampadMacOSWireless>(
22-
matches: new InputDeviceMatcher().WithInterface("HID")
23-
.WithProduct("Xbox.*Wireless Controller")
24-
.WithCapability("vendorId", vendorId)
25-
.WithCapability("productId", productId));
26-
}
27-
2819
// Base layout for Xbox-style gamepad.
2920
InputSystem.RegisterLayout<XInputController>();
3021

@@ -57,6 +48,16 @@ void RegisterXboxOneWirelessFromProductAndVendorID(int vendorId, int productId)
5748
InputSystem.RegisterLayout<XboxGamepadMacOSWireless>(
5849
matches: new InputDeviceMatcher().WithInterface("HID")
5950
.WithProduct("Xbox.*Wireless Controller"));
51+
52+
void RegisterXboxOneWirelessFromProductAndVendorID(int vendorId, int productId)
53+
{
54+
InputSystem.RegisterLayout<XboxOneGampadMacOSWireless>(
55+
matches: new InputDeviceMatcher().WithInterface("HID")
56+
.WithProduct("Xbox.*Wireless Controller")
57+
.WithCapability("vendorId", vendorId)
58+
.WithCapability("productId", productId));
59+
}
60+
6061
#endif
6162
}
6263
}

0 commit comments

Comments
 (0)