Skip to content

Releases: TheNathannator/HIDrogen

v0.4.3: Fix error I missed in the udev refactor

30 Oct 06:40
f991087
Compare
Choose a tag to compare

Fixed

  • Fixed an an improper udev function import that caused an exception in the Linux HID backend.

v0.4.2: More robust libudev loading; fix cross-build errors

14 Oct 06:00
740478c
Compare
Choose a tag to compare

i really dropped the ball on fixing issues promptly with this one lol, many apologies

Fixed

  • libudev should now, finally, load reliably on hopefully all distros. It is now loaded manually instead of DllImported, and multiple possible file names are checked to increase the chances of a successful load.
  • Switching to a build platform other than the current editor platform no longer results in compile errors. You can now cross-build a project which depends on HIDrogen within the same editor instance.
    • Note that all initialization code is stubbed out in the editor when this is done, otherwise runtime errors would result due to being unable to load native libraries. You must switch the build platform back to the same platform as the editor for HIDrogen to function.

Changed

  • Error logging now contains file names and line numbers, to better assist with diagnosis of issues.

v0.4.1: Fix libudev not loading without the development package installed

19 Jul 02:03
ffb0232
Compare
Choose a tag to compare

Fixed

  • There is no longer an unintended dependency on the development version of libudev, it now loads with just the standard libudev0 package.

v0.4.0: XInput Support for Unity 2022.2+

07 Jul 15:30
06ae42e
Compare
Choose a tag to compare

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.

v0.3.1: HID Backend Read Fix

22 Jun 06:42
30bf1e9
Compare
Choose a tag to compare

Fixed

  • The hidapi backend should no longer consistently fail with an interrupted syscall error.
  • The warning message for manual hidapi enumeration is no longer logged unconditionally on exit.
  • A couple wait handle "leaks" have been fixed (I forgot to dispose them up-front, they would get disposed late due to having to be disposed by the GC).

v0.3.0: New GameInput Backend!

18 Jun 06:50
6e10e02
Compare
Choose a tag to compare

Added

  • A new backend has been added for the GameInput API on Windows. This backend allows creating custom layouts and receiving/sending raw inputs/outputs for Xbox One devices.
    • To note: 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 on their end. (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, no duplicate devices will occur between GameInput and XInput, for example.

Changed

  • Some memory allocations that occur in the core backend update loop have been eliminated. All memory allocations that come from HIDrogen should now only happen during device connection/disconnection.
  • Shimming of the native input system's devices on Linux has been changed so that no InputDevice instances will be created for them whatsoever.
    • Before, the device instance would exist for at least one frame before getting removed by the shim.
    • As a side-effect, this unfortunately causes an exception to be thrown/logged internally in the input system. I haven't evaluated whether or not this causes problems, but it should be fine, as the exception is also caught internally.

Fixed

  • A workaround has been implemented to retrieve the version number for Bluetooth HID devices on Linux.
  • Calling InputSystem.RemoveDevice with a HIDrogen device will now also remove the backend device that feeds events to it.
  • Other device removal issues have been fixed.

Removed

  • The HIDROGEN_KEEP_NATIVE_DEVICES define has been removed, as I can't think of any actual genuine use cases for it. All it will end up doing is creating duplicate device instances, and the native instance usually has broken controls.

v0.2.0: For the Betterment of Dev-kind

01 May 13:43
73285a0
Compare
Choose a tag to compare

This release has bug fixes, as per usual, alongside a few new (albeit) minor features, and an important change that may potentially break some device layouts.

Fixed

  • Re-added using directive that's needed for actual Unity player builds.
    • Got removed since it said it wasn't used anymore, but that doesn't take compile defines into account.
  • Fixed HID usage check always failing for hidapi versions below v0.10.1.
  • Fixed Linux shim device removals always being logged, even if the device wasn't actually removed.
  • Fixed hidapi handles not being disposed immediately when failing to add devices to the input system.
  • Fixed device read buffer size including the report ID prepend count.

Added

  • Added device path to device open failure log (GH-2).
  • Added additional logging for device change events for the Linux and HID interfaces.
  • Added HIDROGEN_KEEP_NATIVE_DEVICES compile define to allow for keeping the native-backend versions of devices instead of removing them.
    • Not sure if anyone would actually want to use this, but it's there as an option just in case.

Changed

  • Removed explicit newlines in most log messages, to keep things on a single line in log files.
  • Device removal is now handled by queuing a removal event instead of removing the device itself immediately.
    • I hoped this would allow them to show up as disconnected instead of just disappearing entirely, but it appears that's reserved for native devices only.
  • The report ID byte is no longer enforced by default. The input system on Mac does not include the report ID in its HID support, so this was done to make it easier to account by only needing to include the report ID on Windows. A new HIDROGEN_FORCE_REPORT_IDS compile define is available if you wish to always have the report ID regardless.

v0.1.7: Logging + shim fix

27 Apr 02:51
9a85b89
Compare
Choose a tag to compare

Fixed

  • Hopefully fixed shimmed devices not always being removed, by searching through the device list for them on initializiation.

Added

  • A ton of verbose logging has been added, which can be enabled by defining HIDROGEN_VERBOSE_LOGGING.

v0.1.6: Yet another small blunder fixed

24 Apr 21:37
7dcacdc
Compare
Choose a tag to compare

Fixed

  • HID output commands now work correctly (#1).

New Contributors

v0.1.5: Running out of titles here lol

20 Apr 02:16
868b857
Compare
Choose a tag to compare

Fixed

  • Report ID detection should hopefully work correctly for all devices now.
  • Report ID detection also now adjusts the bit offsets and report lengths provided in the capabilities info to compensate for the additional byte being added to the input report data.
  • The library name used for imports has been changed, it should now load without requiring libhidapi-dev to be installed.