Skip to content

Commit

Permalink
Guard method with macOS platform define
Browse files Browse the repository at this point in the history
  • Loading branch information
jfreire-unity committed Jan 14, 2025
1 parent 11cdac3 commit bbe4f38
Showing 1 changed file with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ static class XInputSupport
{
public static void Initialize()
{
void RegisterXboxOneWirelessFromProductAndVendorID(int vendorId, int productId)
{
InputSystem.RegisterLayout<XboxOneGampadMacOSWireless>(
matches: new InputDeviceMatcher().WithInterface("HID")
.WithProduct("Xbox.*Wireless Controller")
.WithCapability("vendorId", vendorId)
.WithCapability("productId", productId));
}

// Base layout for Xbox-style gamepad.
InputSystem.RegisterLayout<XInputController>();

Expand Down Expand Up @@ -57,6 +48,16 @@ void RegisterXboxOneWirelessFromProductAndVendorID(int vendorId, int productId)
InputSystem.RegisterLayout<XboxGamepadMacOSWireless>(
matches: new InputDeviceMatcher().WithInterface("HID")
.WithProduct("Xbox.*Wireless Controller"));

void RegisterXboxOneWirelessFromProductAndVendorID(int vendorId, int productId)
{
InputSystem.RegisterLayout<XboxOneGampadMacOSWireless>(
matches: new InputDeviceMatcher().WithInterface("HID")
.WithProduct("Xbox.*Wireless Controller")
.WithCapability("vendorId", vendorId)
.WithCapability("productId", productId));
}

#endif
}
}
Expand Down

0 comments on commit bbe4f38

Please sign in to comment.