1
0
Форкнуть 0

relocate old python driver, add raw mode to C one

pull/2/head
Toad King 9 лет назад
Родитель 72b764545b
Коммит cd5c88c5e4

@ -5,18 +5,22 @@ Tool for using the Wii U GameCube Adapter on Linux
Prerequisites
-------------
* Python 2
* PyUSB
* Python-uinput
* libudev
* libusb(x) >= 1.0.16
Building
--------
Just run `make`. That's all there is to it!
Usage
-----
Simply run the program. You'll probably have to run it as root in order to
grab the USB device from the kernel and use the uinput interface. To stop the
program just kill it in any way you want.
grab the USB device from the kernel and use the uinput interface. Both of
these can be worked around with udev rules, which I'm currently too lazy to
add at the moment. To stop the program just kill it in any way you want.
Seperate virtual controllers are created for each one plugged into the adapter
and hotplugging is supported.
and hotplugging (both controllers and adapters) is supported.
Quirks
------
@ -25,6 +29,9 @@ Quirks
so with `modprobe uinput`
* If all your controllers start messing with the mouse cursor, you can fix
them with this xorg.conf rule. (You can place it in a file in xorg.conf.d)
* Input ranges on the sticks/analog triggers are scaled to try to match the
physical ranges of the controls. To remove this scaling run the program with
the `--raw` flag.
````
Section "InputClass"

@ -557,11 +557,17 @@ static int hotplug_callback(struct libusb_context *ctx, struct libusb_device *de
return 0;
}
int main(void)
int main(int argc, char *argv[])
{
struct udev *udev;
struct udev_device *uinput;
if (argc > 1 && (strcmp(argv[1], "-r") == 0 || strcmp(argv[1], "--raw") == 0))
{
fprintf(stderr, "raw mode enabled\n");
raw_mode = true;
}
if (pthread_mutex_init(&adapter_mutex, NULL) < 0)
{
fprintf(stderr, "mutex/cond init errors\n");

Загрузка…
Отмена
Сохранить