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

Force-feedback is not properly advertised when enabled #232

Open
RalfJung opened this issue May 16, 2017 · 1 comment
Open

Force-feedback is not properly advertised when enabled #232

RalfJung opened this issue May 16, 2017 · 1 comment

Comments

@RalfJung
Copy link

It seems like xboxdrv does not properly advertise supporting force-feedback even when it is enabled. As a result, Windows programs executed via wine think the gamepad does not support force feedback, and do not use it. Also see https://bugs.winehq.org/show_bug.cgi?id=33522.

@00cpxxx
Copy link

00cpxxx commented May 16, 2017

To clarify the source code side, wine does:

ioctl(fd, EVIOCGBIT(0, sizeof(joydev.evbits)), joydev.evbits); //get feature bits
test_bit(joydev.evbits, EV_FF) //check if FF was advertised
ioctl(fd, EVIOCGBIT(EV_FF, sizeof(joydev.ffbits)), joydev.ffbits) //read FF supported effect bits
ioctl(fd, EVIOCGEFFECTS, &joydev.num_effects) // read number of effects
joydev.num_effects > 0 //ensure at least 1 effect is supported

At some point there is a failure in a step and Wine gives up FF for the device. The code starts around [1], FF checks are around line 284.

[1] https://source.winehq.org/source/dlls/dinput/joystick_linuxinput.c#0218

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

No branches or pull requests

2 participants