diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 3453304eb6..28ec50b015 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed an incorrect ArraysHelper.HaveDuplicateReferences implementation that didn't use its arguments right [ISXB-1792] (https://github.com/Unity-Technologies/InputSystem/pull/2376) - Fixed `InputAction.IsPressed`, `WasPressedThisFrame`, and `WasReleasedThisFrame` using a `ButtonControl`'s `pressPoint` when a binding also had an explicit `PressInteraction` with its own `pressPoint`, which could make those APIs disagree with the interaction's press and release behavior. Action-level press APIs now follow the interaction threshold when both are set explicitly. - Fixed `IndexOutOfRangeException` in `InputDeviceBuilder` when connecting an HID gamepad whose report descriptor declares a hat switch with Report Size 8 (e.g. ESP32-BLE-Gamepad). The HID layer now anchors the hat's directional sub-controls to the hat's own byte instead of letting the layout system auto-allocate a fresh byte for each [UUM-143659](https://jira.unity3d.com/browse/UUM-143659). +- Fixed Xbox 360 (and other Xbox) controllers on macOS falling back to the generic HID joystick layout instead of `XboxGamepadMacOSNative`. The matcher used `WithManufacturer("Microsoft")`, which is an exact case-insensitive equality check for plain-letter patterns and therefore did not match real-world manufacturer strings such as `"Microsoft Corporation"` (sometimes prefixed with an invalid byte rendered as U+FFFD on macOS Tahoe). Switched to `WithManufacturerContains("Microsoft")`. ### Changed - Action-level `IsPressed`, `WasPressedThisFrame`, and `WasReleasedThisFrame` for bindings to `Vector2Control` / `StickControl` no longer consult a per-control `pressPoint` on the vector (that field was removed). Use a `Press` interaction to set a custom threshold, or rely on `defaultButtonPressPoint`. diff --git a/Packages/com.unity.inputsystem/InputSystem/Runtime/Plugins/XInput/XInputSupport.cs b/Packages/com.unity.inputsystem/InputSystem/Runtime/Plugins/XInput/XInputSupport.cs index 896620ba8d..8f808b3fb0 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Runtime/Plugins/XInput/XInputSupport.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Runtime/Plugins/XInput/XInputSupport.cs @@ -32,10 +32,13 @@ public static void Initialize() // Matches macOS native support for Xbox Controllers - // macOS reports all Xbox controllers as "Controller" with manufacter Microsoft + // macOS reports all Xbox controllers as "Controller" with manufacturer Microsoft, though the + // exact manufacturer string varies ("Microsoft Corporation", sometimes with a leading invalid + // byte rendered as U+FFFD on macOS Tahoe). WithManufacturer does an exact case-insensitive + // equality check for plain-letter patterns, so we use WithManufacturerContains here. InputSystem.RegisterLayout( matches: new InputDeviceMatcher().WithInterface("HID") - .WithProduct("Controller").WithManufacturer("Microsoft")); + .WithProduct("Controller").WithManufacturerContains("Microsoft")); // Matching older Xbox One controllers that have different View and Share buttons than the newer Xbox Series // controllers.