Game Control Plus - avoid config pop up

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?

…sorry for the updates and changes, just working through this

If you have managed to make the connection why you should you need to reconnect?

Just looked at the source code and it seems you are correct. Once a device has been found then it is no longer available to be found a second time.


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.

I didn’t create the original library I simply modified some of the original syntax to make it work with Processing V3 and added the configurator.

The original library required the controller to be plugged in before running the sketch and I have no idea whether it is possible to change this, and if it was possible I have no idea how to do it. :grinning:

Sorry about that but happy you like GCP.


Alright, I see; thanks.

By ‘original library’, do you mean the* library that comes with the import?
I’m looking through there now to see if there’re solutions.

I found this: [SOLVED] Game Control Plus: how to reconnect wireless XBOX controller after it turned off - #12 by quark and will try to implement it soon to see if I can get it for a workaround.

The source code is split over three packages

  2. org.gamecontrolplus
  3. org.gamecontrolplus.gui

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. :grinning:i