/** 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(); } }
/** Close down any open controllers etc. */ public static void close() { if (Preferences.gamepad) { if (Preferences.useXInput) XInput.enable(false); } }