Browse Source

relocate old python driver, add raw mode to C one

pull/1/head
Toad King 6 years ago
parent
commit
cd5c88c5e4
3 changed files with 20 additions and 7 deletions
  1. +13
    -6
      README.md
  2. +0
    -0
      old/wii-u-gc-adapter.py
  3. +7
    -1
      wii-u-gc-adapter.c

+ 13
- 6
README.md View File

@@ -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"


wii-u-gc-adapter.py → old/wii-u-gc-adapter.py View File


+ 7
- 1
wii-u-gc-adapter.c View File

@@ -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");


Loading…
Cancel
Save