Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Getting game control plus to read controller

$
0
0

I had a project i was working on for a few weeks that I left in a semi-working condition. recently I came back to it and was unable to even read from by controller. I made a simplified code below to test and still no read was available.

import net.java.games.input.*;
import org.gamecontrolplus.*;
import org.gamecontrolplus.gui.*;

ControlIO control;
ControlDevice device;

void setup()
{
  size(100, 100);
  control = ControlIO.getInstance(this);
  device =  control.getDevice("Logitech Cordless RumblePad 2");
  device = control.getMatchedDevice("testing2");

  if (device == null)
  {
    println("No suitable device configured");
    System.exit(-1); // End the program NOW!
  }
}

void draw()
{
  println(device.getButton("Button0").pressed());
}

Any idea what could be causing this?


Viewing all articles
Browse latest Browse all 2896

Trending Articles