DanielOgorchock / joycond

userspace daemon to combine joy-cons from the hid-nintendo kernel driver
GNU General Public License v3.0
360 stars 68 forks source link

uinput: ff: fix rumble for dual Joycon and Snes #108

Closed CTCaer closed 2 years ago

CTCaer commented 2 years ago

This fixes an issue where every ff effect requested to allocate a new one on the device. That was making every effect to be the first one and then deplete the maximum allowed effects on the device.

So, actually use the rumble effects map for checking if already uploaded instead of incorrectly warning and readding the same effect as a new one.

Context: FF uapi in linux expects an id of -1 for allocating a new effect and an existing one for updating it.

DanielOgorchock commented 2 years ago

Thanks!