I want to use the GameControlPlus Library on the new RaspberryPi Model 5, which is aarch64 architecture. GameControlPlus uses the JInput library, which is not provided in the correct architecture in the library itself: UnsatisfiedLinkError: /home/myuser/sketchbook/libraries/GameControlPlus/library/libjinput-linux.so: /home/myuser/sketchbook/libraries/GameControlPlus/library/libjinput-linux.so: wrong ELF class: ELFCLASS32 (Possible cause: can't load IA 32 .so on a AARCH64 platform) A library used by this sketch relies on native code that is not available.
So I installed JInput directly on the PI via apt, which installs version “20100502+dfsg-11”, of which I copied libjinput.so to the library folder and named it libjinput-linux.so. That changes the error to: UnsatisfiedLinkError: 'void net.java.games.input.LinuxEventDevice.nGetDeviceUsageBits(long, byte[])'
This makes me believe that my approach halfway worked, because Processing/Java could load JInput, but maybe the installed version is wrong?
Is there any way GameControlPlus could work on a raspberry pi? I would appreciate pointers in the right direction!
As I said on my website GCP is based on a library called proCONTROLL first released 20 years ago. Even when I updated it to Processing 3 (back in 2014) I did not change any of the low level code, I simply added a higher level API. It is unlikely that GCP will work on a raspberry pi and even if it did it is unlikely to work with modern input devices.
Got it working for my needs, but not with GameControlPlus. I used JInput directly instead, see below.
But I got GameControlPlus somewhat running on the RaspberryPI: I installed libjinput via apt, then (if I recall correctly, has been last week and i did not pursue that approach any further) copied the *.jar (/usr/share/java/jinput.jar) and *.so (/usr/lib/jni/libjinput.so) files to the library directory (replacing the corresponding GameControlPlus files installed via processing) and renamed the *.so file to libjinput-linux.so.
Alternate Idea using JInput directly works very good: