#virtual #input #gamepad #joystick #emulation #vjoy

sys vjoy-sys

Rust bindings to vJoy - a virtual input device driver for Windows

7 unstable releases (3 breaking)

0.4.1 Jun 24, 2023
0.4.0 Jun 24, 2023
0.3.0 Apr 11, 2023
0.2.0 Apr 10, 2023
0.1.2 Apr 6, 2023

#300 in Windows APIs

28 downloads per month
Used in vjoy

MIT/Apache

12KB
70 lines

Crates.io docs.rs Crates.io

vjoy-sys

Rust bindings to vJoy via bindgen. Built against version 2.1.9.1

About vJoy

vJoy simulates up to 16 input devices with up to 128 buttons, 8 axes, and 4 hat switches (4-way or continuous). The virtual devices can be used to

  1. Emulate gamepads/joysticks for older games that require a specific kind of input.
  2. Combine multiple physical devices into one virtual.
  3. Apply transformations from a physical device to a virtual device (e.g. 2-button to axis rebind, software filtering etc.).

Usage

The vJoy driver version 2.1.9.1 needs to be installed and is only available for Windows.

The vJoy shared library is loaded at runtime via libloading. See the sanity test for specifics.

Updating bindings

For a new version of vJoy, the header files in /vjoy have be replaced and may have to be modified (e.g. redefine typedefs, insert "enum" keyword, remove unused includes etc.) to work with bindgen - as of this verison the original C headers resulted in various bindgen errors during build.

Dependencies

~0.1–2.2MB
~39K SLoC