Add special SDL2 joystick event system for input config #28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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.