Example #1
0
  /** Set up the inputs. */
  public static void init() {

    // TODO: Set it up differently. Gamepad and NonGamepad Interfaces, applied by client instead.
    if (Preferences.gamepad) {
      if (Preferences.useXInput) {
        XInput.enable(true);
        gamepad = new XInputXboxController();
        // ((XInputXboxController) gamepad).rumbleOn();
      } else {
        gamepad = new JInputXboxController();
      }
      gamepad.init();
    }
  }
Example #2
0
 /** Close down any open controllers etc. */
 public static void close() {
   if (Preferences.gamepad) {
     if (Preferences.useXInput) XInput.enable(false);
   }
 }