I am Quark’s Game Control Plus library and have been going through it for the past few days, setting it up. However, I want to run it without the configuration window popping up, which I can get it to do if I set it up in the setup() with the same method as in the “Gcp_gamepad” example. However, if I call a function to set it for me, or call it in the draw(), it still calls the config window. I’ve been trying to look through the documentation but having trouble understanding exactly how this window triggers, and I didn’t see a mention in the video tutorials, so I’m just wondering if anyone has insight into this and can help me understand how to prevent the config window from being called.
Tried using getMatchedDeviceSilent(filename/configuration) instead of getMatchedDevice(filename), but it is not getting the right device, as indicated when getting the controls gives a nullPointerError.
So, I’ve gotten it working now with the
ControlDevice controllerDevice = controlIO.filter(GCP.GAMEPAD).getMatchedDeviceSilent(Configuration.makeConfiguration(app, “controller”));
so that’s all good.
However, when I try to set up the reconnecting, I am getting the issue that when I try to rerun the connection after it is connected, it returns null. Does anyone know why it does this and what I can do to fix it? Is it because it’s already connected so it’s unable to use that device and therefore returning null because nothing else is available? Is there a way to then check all devices including what’s being used already?
Oooooh, the man himself. Thanks for the library, it’s amazing!
The reason is that I want to be able to connect a remote:
-while the program is running (rather than just at setup)
-when it has been manually disconnected and plugged back in
I am working to modify it so that it only checks if it can poll the controller (still trying to figure out the exact way to check that) and sets the status to disconnected if not, then it will try to connect every second (60 frames), so if it’s plugged back in, it should be able to reload the ControlIO and get the device again; that is my intention here.
The original library called proCONTROLL created by Christian Riekoff in 2005 includes files from the first 2 packages. It also includes all the necessary OS dependent system (binary) files found in the library download.
I simply updated the the source code in the 2nd package to work with Processing 3 and added the configurator code found in package 3.
My original title for GCP was proControllPlus to recognise the work of the original author. Unfortunately when I submitted the library to Processing they decided to strictly enforce the naming rules for contributed libraries, something they hadn’t done for previous libraries. So the name couldn’t start with pro hence GamesControlPlus to minimize the amount of work to change the library documentation and website.
Interesting post from 2019 let us know how you get on. i