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

Linux evdev controller backend fixes (and misc linux fixes) #3244

Merged
merged 5 commits into from
Aug 19, 2017

Conversation

hcorion
Copy link
Member

@hcorion hcorion commented Aug 16, 2017

This PR includes

  • Improved evdev controller detection, this fixes detection of the Steam Controller when used with sc-controller
  • Adds joystick squircling, which makes running in Persona 5 nicer, same implementation as xinput and dualshock 4 backends.
  • Adds a quick fix for developer builds and standard linux builds (for example, the Arch AUR), to no longer give experimental build warning.
  • Updates ffmpeg again, to fix the issue here: http://www.emunewz.net/forum/showthread.php?tid=174368&pid=285178#pid285178 again.

Requesting review from @kirbyfan64 @Kozek

Requesting testing from @gasinvein @gadzook @ghost and @toccata10


pre-compiled AppImage link for testing: https://transfer.sh/pwI71/eb22e4e-178_linux64
(will expire in 14 days)
To run AppImage:

wget https://transfer.sh/pwI71/eb22e4e-178_linux64
chmod a+x ./eb22e4e-178_linux64
./eb22e4e-178_linux64

@refi64
Copy link
Contributor

refi64 commented Aug 16, 2017

/usr/bin/ld: mux.o: access beyond end of merged section (19645)

What the heck?

@hcorion
Copy link
Member Author

hcorion commented Aug 16, 2017

IKR, the weird thing is that it failed before I updated the ffmpeg submodule, but only in the gcc build.

@hcorion hcorion force-pushed the evdev-fixes branch 5 times, most recently from 8d00383 to 487bca2 Compare August 17, 2017 00:29
@hcorion
Copy link
Member Author

hcorion commented Aug 17, 2017

Ok, turns out the weird linking issue was a bug in binutils 2.26 linking against libraries (namely, the updated ffmpeg ones) compiled with a newer gcc, so we have to use a newer binutils version for the build.

@gasinvein
Copy link
Contributor

@hcorion, gamepad with sc-controller works, but rpcs3 log is filled with lines E Unknown joystick #2 event 2, and also this seems like emulation is slowed down.

@hcorion
Copy link
Member Author

hcorion commented Aug 18, 2017

Hmmm, can you upload your RPCS3.log @gasinvein ? (It's at ~/.config/rpcs3/RPCS3.log), looks like my joystick detector is faulty.

@refi64
Copy link
Contributor

refi64 commented Aug 18, 2017

I think I know the problem. The JOYSTICK_BUSTYPE macro is actually just BUS_USB, so all USB devices are getting picked up as joysticks.

A "proper" solution would be to use libudev, which invokes callbacks with arguments that can be used to determine if the input device is a joystick (it would also add room for hot plugging). However, as a temporary fix, we could mimic what SDL does. Off the top of my head, I think a libevdev equivalent would be:

if (libevdev_has_event_type(dev, EV_KEY) &&
    libevdev_has_event_code(dev, EV_ABS, ABS_X) &&
    libevdev_has_event_code(dev, EV_ABS, ABS_Y))
{
    // It's a joystick.
}

@hcorion hcorion force-pushed the evdev-fixes branch 4 times, most recently from 3d812d3 to 94735f4 Compare August 18, 2017 20:10
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.

None yet

4 participants