Skip to content

Commit

Permalink
v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNathannator committed Jul 7, 2024
1 parent 37a52e5 commit 06ae42e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
12 changes: 12 additions & 0 deletions Packages/com.thenathannator.hidrogen/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

Dates are relative to UTC.

## [0.4.0] - 2024/07/07

### Added

- A new backend has been implemented to re-introduce XInput device support on Unity 2022.2 and onward.
- Just about all functionality provided by the native backend in 2022.1 and earlier is supported in this new backend, so all layouts built for it will work here.
- Gamepad devices are ignored by this backend, as they will still be handled by the native backend through Windows.Gaming.Input.

### Fixed

- The GameInput backend no longer consumes excessive amounts of CPU due to not actually performing any thread sleeps.

## [0.3.1] - 2024/06/22

### Fixed
Expand Down
11 changes: 11 additions & 0 deletions Packages/com.thenathannator.hidrogen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ An add-on for the [Unity InputSystem](https://github.com/Unity-Technologies/Inpu
- [Xbox One Controllers on Windows via GameInput](#xbox-one-controllers-on-windows-via-gameinput)
- [Dependencies](#dependencies-1)
- [Notes](#notes)
- [XInput Backend on Windows for Unity 2022.2+](#xinput-backend-on-windows-for-unity-20222)
- [Notes](#notes-1)
- [License](#license)

## Usage
Expand Down Expand Up @@ -75,6 +77,15 @@ This backend depends on GameInput being installed on the user's system. Although
- As of the time of writing, the GameInput function that is responsible for sending raw output reports is not currently implemented. All output commands will silently fail until it gets implemented. (Only the `E_NOTIMPL` HRESULT is treated as success, all others will be logged and generate a proper failure code.)
- Gamepads reported through GameInput are ignored, to ensure no duplicate devices will occur between GameInput and XInput.

### XInput Backend on Windows for Unity 2022.2+

This backend reintroduces XInput support to Unity 2022.2 and onward; starting from 2022.2 they switched to Windows.Gaming.Input for gamepad support. All existing XInput layouts and commands are supported through this backend, except for gamepads, which will be handled by the native backend already and are ignored.

#### Notes

- This backend will only enable itself in Unity 2022.2 and onward. No special setup is needed for it.
- This backend does not respect the `InputSystem.pollingFrequency` setting currently, it uses a hard-set sleep time of 1 ms.

## License

This project is licensed under the MIT license. See [LICENSE.md](LICENSE.md) for details.
2 changes: 1 addition & 1 deletion Packages/com.thenathannator.hidrogen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.thenathannator.hidrogen",
"version": "0.3.1",
"version": "0.4.0",
"displayName": "HIDrogen",
"description": "An add-on for the Unity InputSystem package that provides proper HID device support on Linux.",
"unity": "2019.4",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ See the [Unity documentation](https://docs.unity3d.com/Manual/upm-git.html) for
#### Via URL

1. Open the Unity Package Manager and hit the + button, then select `Add package from git URL`.
2. Paste in `https://github.com/TheNathannator/HIDrogen.git?path=/Packages/com.thenathannator.hidrogen#v0.3.1` and hit Add.
2. Paste in `https://github.com/TheNathannator/HIDrogen.git?path=/Packages/com.thenathannator.hidrogen#v0.4.0` and hit Add.

To update, increment the version number at the end of the URL to the new version number and repeat these steps with the new URL. Alternatively, you can edit the URL listed in your `manifest.json` file as described in the [Via Manifest](#via-manifest) section.

Expand All @@ -49,7 +49,7 @@ In your Packages > `manifest.json` file, add the following line to your `depende
```diff
{
"dependencies": {
+ "com.thenathannator.hidrogen": "https://github.com/TheNathannator/HIDrogen.git?path=/Packages/com.thenathannator.hidrogen#v0.3.1"
+ "com.thenathannator.hidrogen": "https://github.com/TheNathannator/HIDrogen.git?path=/Packages/com.thenathannator.hidrogen#v0.4.0"
}
}
```
Expand Down

0 comments on commit 06ae42e

Please sign in to comment.