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

ControllerInterface: evdev: Cleanups and effect processing fixes. #7688

Open
wants to merge 2 commits into
base: master
from

Conversation

4 participants
@jordan-woyak
Copy link
Contributor

jordan-woyak commented Jan 8, 2019

Moved the rumble period and length constants into the Device.h header to keep the input backends consistent with some effect parameters.

Fixed evdev to not remove and re-upload effects with every call to SetState().

Added support for "Constant" effect types and disabled auto-centering.

  • Wheels will probably work now, but untested.

Replaced the poorly named "LeftRight" output with separate "Strong" and "Weak" outputs to separately control strong and weak motors.

  • This is kinda the whole point of the "rumble" effect type.

Other minor cleanups throughout evdev.

@jordan-woyak jordan-woyak force-pushed the jordan-woyak:evdev-improve branch from 8ff8bdb to 28696e0 Jan 8, 2019

@jordan-woyak jordan-woyak force-pushed the jordan-woyak:evdev-improve branch 3 times, most recently from 42a72cb to 13d902b Jan 8, 2019

@Shoegzer

This comment has been minimized.

Copy link

Shoegzer commented Jan 11, 2019

Tested and this seems to be working fine here - nice work @jordan-woyak. There are a few issues but I'm guessing these are fodder for a separate PR:

  • range should probably be limited to 0-100
  • range should probably be retitled as "strength percentage"
  • rumble test in Qt UI not working for evdev/0 when pad range/strength is changed while ingame
Show resolved Hide resolved Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp Outdated
{
if (rc == LIBEVDEV_READ_STATUS_SYNC)
input_event ev;
if (LIBEVDEV_READ_STATUS_SYNC == rc)

This comment has been minimized.

@leoetlino

leoetlino Jan 16, 2019

Member

Is there any reason this was inverted? Seems inconsistent with the rest of the code.

This comment has been minimized.

@jordan-woyak

jordan-woyak Jan 17, 2019

Contributor

No particular reason.

@@ -291,121 +322,175 @@ ControlState evdevDevice::Button::GetState() const
}

evdevDevice::Axis::Axis(u8 index, u16 code, bool upper, libevdev* dev)

This comment has been minimized.

@leoetlino

leoetlino Jan 16, 2019

Member

upper isn't used anymore, is it?

This comment has been minimized.

@jordan-woyak

jordan-woyak Jan 17, 2019

Contributor

It is still used in the constructor logic.

jordan-woyak added some commits Jan 8, 2019

ControllerInterface: evdev: Cleanup rumble effect processing so effec…
…ts aren't removed and re-uploaded with every SetState() call. Split the "LeftRight" output into separate "Strong" and "Weak" outputs. Other minor cleanups.

@jordan-woyak jordan-woyak force-pushed the jordan-woyak:evdev-improve branch from a817b11 to 6cc8775 Jan 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment