mupen64plus/mupen64plus-ui-python — pull request #28 by fayvel (2014-10-12 12:04:27+00:00)
Title: Add special SDL2 joystick event system for input config

The SDL1.2 system cannot cope with Dualshock and similar controllers. After pressing the config button, an random axis will be configured. This happens because the state of the device (with 27 or more axis) changes all the time.

This problem can be avoided for these devices under Linux when SDL2 is used together with its event system. These random movements doesn't anymore with these joysticks and the hid_sony driver in SDL2+SDL_PollEvent.

This seem to be fixable with SDL1.2 because it just cannot handle newer devices. Also the SDL_PollEvent doesn't work with the ctypes version of PySDL for unknown reasons. Thus the implementation cannot be shared between SDL1.2 and SDL2.

To use the new input detection, m64py must be started with the sdl2 option and a version of mupen64plus compiled against SDL2.

$ m64py --sdl2

This was the only way I could use my Dualshock4 and Dualshock3 gamepads on Linux with the input configuration. Otherwise I've just had the problem described in #10 and #11.