Open Krayfighter opened 2 years ago
The reason why this is happening is because the set_vibration method actually writes the effect to the gamepad when called. Your gamepad probably has 16 slots for effects. After calling it 16 times, there is no more space to store another effect. This library is unmaintained, but you can address it for yourself by splitting out the writing of the effect into its own method that is called only once.
the following code works
so long as the range is less than 17
otherwise, is will give the following stack trace
this work inside and outside of a loop, and for the duration of the process' lifetime, limiting the number of calls to this function to 16 for the entire program runtime
I also noticed that if I had 2 python instances open, I could use all the the 16 function calls in the first, and the second would be unable to call the function, giving the same stack trace.
my system:
Operating System: Fedora Linux 35 KDE Plasma Version: 5.25.4 KDE Frameworks Version: 5.96.0 Qt Version: 5.15.2 Kernel Version: 5.19.6-100.fc35.x86_64 (64-bit) Graphics Platform: Wayland Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz Memory: 15.3 GiB of RAM Graphics Processor: Mesa Intel® Xe Graphics Manufacturer: Framework Product Name: Laptop System Version: A3
Python 3.10.6 inputs 0.5