Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add special SDL2 joystick event system for input config #28

Merged
merged 1 commit into from Oct 13, 2014
Merged

Add special SDL2 joystick event system for input config #28

merged 1 commit into from Oct 13, 2014

Conversation

ghost
Copy link

@ghost ghost commented Oct 12, 2014

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.

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
@ghost ghost mentioned this pull request Oct 12, 2014
gen2brain added a commit that referenced this pull request Oct 13, 2014
Add special SDL2 joystick event system for input config
@gen2brain gen2brain merged commit 537419e into mupen64plus:master Oct 13, 2014
@ghost ghost deleted the joystick_detect branch October 13, 2014 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant