User:NetSysFire/Emu gyroscope

From ArchWiki

There are many guides on the web about using a compatible gamepad with an emulator such as yuzu, cemu or dolphin. However, many of them were never updated or did not include some workarounds.

Installation

Using a Nintendo Switch Pro controller? Install evdevhook2AUR.

Alternatively you can use any Android phone and install https://github.com/PlayXboxtion963/AndroidDSU (or any compatible motion source application) on it. The optimal solution would be to connect it to a wifi both the phone and the device you run the emulator on shares. Latency is key here, so although it may work via VPN shenanigans, try to avoid that.

Usage

If you have a Pro controller, simply run:

$ evdevhook2

This starts a process to make the gyroscope input available on a local port.

Configuration

In e.g yuzu, enter Emulation > Configure > Controls.

If you use a phone, click Configure below the checkbox for Motion in the lower left and enter the IP address of your phone and test whether the DSU server is properly responding.

In any case, click on Motion 1, below the depicted gamepad and follow the instruction to physically shake your input device, which will register the gyroscope input.

Troubleshooting

The phone is displaying the right IP but is not receiving/sending anything

Android can be really picky about powersaving and network permissions. Close the app, make sure it actually restarts, and try again. In extreme cases turn your wifi off and on again.