Skip to content

Using Gamepads with IOSync

Anthony Diamond edited this page May 2, 2015 · 1 revision

Introduction & Overview

Very early versions of IOSync did not support gamepad I/O. Today, gamepads may be detected by clients, and simulated by hosts. This article covers how IOSync handles gamepad devices, as well as setting up this functionality.

Gamepad integration is partially automated by default. If a real controller/gamepad is plugged in on a client's end, IOSync will see it, and then immediately attempt to "connect" that device to the remote machine. The idea here is that a client's gamepad(s) are plugged in physically, and by plugging a device in, it is also connected on the other end.

Clients: If you are having trouble getting IOSync to see your local gamepad, you may need to use an input alternative, like x360ce.

For clients, that's all you need to know. Everything's handled for them. Servers/hosts on the other hand have to do a bit of work. Clients and hosts should follow this page, for configuration notes.

The rest of this page is dedicated to hosts/servers:

If this page does not help you, please feel free to open an issue.

Virtual XInput Gamepad Support

Virtual XInput devices (Clients' gamepads) are only available to programs which use XInput normally, and are able to be easily "injected" into. The latest versions of IOSync may request a "PID" when starting up. You may use this to inject one of the "injector" DLLs/modules. This can be a window name, process ID, or executable name. For details on injection options, click here. The exact module used is dependent on the process's architecture/platform. This will be resolved automatically. In the event remote injection does not work well (Actively changing module/memory state, original module gets unloaded, etc), you may also use the "injection modules" as wrappers/"shims" for the executable directly. This can be done by copying and/or moving the appropriate DLL (Correct architecture; probably x86) into the same folder as the targeted executable, then renaming the module to be the correct XInput module-name ("xinput1_X.dll", "xinput9_1_0.dll", etc). Other injection options are available, besides the initial injection request. As the license says, I'm not held responsible for what happens when you use this software.

If the targeted program/game does not use XInput, injection will not work. In these cases, your options are either vJoy, or mapping controls to a shared keyboard. If you're still set on using gamepads/controllers, please read the section regarding vJoy functionality.

vJoy Gamepad Support (DirectInput, etc)

As of version 1.0.3, IOSync may be used to "feed" re-encoded data into vJoy for simulation purposes. vJoy is a DirectInput "simulation driver", which allows external applications to read and write to virtual devices. Unlike IOSync's XInput functionality, vJoy works at the kernel's level as a driver. This means injection is not needed. XInput injection is still the preferred method for gamepad functionality (If XInput is used), but a number of applications rely upon DirectInput and/or an alternative that does not work with XInput. By default, vJoy support is enabled, and will work using either a local interface-module, or your vJoy installation's interface-module. This process is automated. For details on configuring IOSync's vJoy functionality, please view this page.

To utilize IOSync's vJoy functionality, you'll first need to download it. Once you've downloaded and installed vJoy, run "vJoyConf" ("Configure vJoy"). From there, select a device-number, then click "Add Device". Once your device is connected, configuration is mostly up to you.

If you'd like to map an Xbox 360 controller (Or similar), then the number of buttons should be set to either 16 or 32 (Most buttons are unused, currently). To accurately represent an Xbox 360 controller, you should ensure the X, Y, Z, Rx, and Ry axes are all enabled. IOSync should safely disregard disabled axes, in the event you decide to restrict or disable an axis. IOSync does not currently support the Rz axis, the triggers are currently mapped to the Z axis. IOSync supports both 4-directional and continuous POV modes. For most cases, 1 continuous POV switch is ideal; IOSync does not support more than one at this time. All unmentioned axes supported by vJoy are unused or undocumented.

Exact configuration procedures may change in the future. As stated here, vJoy is now an officially signed driver.