diff --git a/src/net/ash/HIDToVPADNetworkClient/gui/GuiInputControls.java b/src/net/ash/HIDToVPADNetworkClient/gui/GuiInputControls.java index 66df8aa..7e1b30f 100644 --- a/src/net/ash/HIDToVPADNetworkClient/gui/GuiInputControls.java +++ b/src/net/ash/HIDToVPADNetworkClient/gui/GuiInputControls.java @@ -52,7 +52,7 @@ public class GuiInputControls extends JPanel implements ActionListener { private JTextField ipTextBox; private JPanel ipTextBoxWrap; private JLabel statusLabel; - + private JPanel autoActivateWrap; private JCheckBox cbautoActivateController; @@ -79,12 +79,11 @@ public class GuiInputControls extends JPanel implements ActionListener { statusLabel = new JLabel("Ready."); statusLabel.setAlignmentX(Component.CENTER_ALIGNMENT); - - - cbautoActivateController = new JCheckBox(); + + cbautoActivateController = new JCheckBox(); cbautoActivateController.setSelected(Settings.AUTO_ACTIVATE_CONTROLLER); cbautoActivateController.addActionListener(new ActionListener() { - + @Override public void actionPerformed(ActionEvent e) { boolean selected = ((JCheckBox) e.getSource()).isSelected(); @@ -92,12 +91,12 @@ public class GuiInputControls extends JPanel implements ActionListener { cbautoActivateController.setSelected(selected); } }); - + autoActivateWrap = new JPanel(new FlowLayout()); autoActivateWrap.add(new JLabel("Auto Activate Controller: ")); autoActivateWrap.add(cbautoActivateController); autoActivateWrap.setMaximumSize(new Dimension(1000, 20)); - + add(Box.createVerticalGlue()); add(ipTextBoxWrap); diff --git a/src/net/ash/HIDToVPADNetworkClient/manager/ControllerManager.java b/src/net/ash/HIDToVPADNetworkClient/manager/ControllerManager.java index 024a14d..a287081 100644 --- a/src/net/ash/HIDToVPADNetworkClient/manager/ControllerManager.java +++ b/src/net/ash/HIDToVPADNetworkClient/manager/ControllerManager.java @@ -98,7 +98,7 @@ public class ControllerManager { } catch (ControllerInitializationFailedException e) { // e.printStackTrace(); } - break; + break; case XINPUT14: try { c = new XInput14Controller(deviceIdentifier); @@ -108,7 +108,7 @@ public class ControllerManager { break; case XINPUT13: try { - c = new XInput13Controller(deviceIdentifier); + c = new XInput13Controller(deviceIdentifier); } catch (ControllerInitializationFailedException e) { // e.printStackTrace(); } @@ -117,7 +117,7 @@ public class ControllerManager { break; } if (c != null) { // I don't like that starting the Thread happens here =/ - if(Settings.AUTO_ACTIVATE_CONTROLLER){ + if (Settings.AUTO_ACTIVATE_CONTROLLER) { c.setActive(true); } new Thread(c).start(); diff --git a/src/net/ash/HIDToVPADNetworkClient/util/Settings.java b/src/net/ash/HIDToVPADNetworkClient/util/Settings.java index d960c7c..2d18c12 100644 --- a/src/net/ash/HIDToVPADNetworkClient/util/Settings.java +++ b/src/net/ash/HIDToVPADNetworkClient/util/Settings.java @@ -26,17 +26,11 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import java.util.Properties; import lombok.Getter; import lombok.Setter; import lombok.extern.java.Log; -import net.ash.HIDToVPADNetworkClient.controller.Controller.ControllerType; -import net.ash.HIDToVPADNetworkClient.util.Settings.Platform; - -//TODO autosave IP addr @Log public class Settings { @@ -91,11 +85,11 @@ public class Settings { Settings.ipAddr = prop.getProperty("ipAddr"); String autoActivatingControllerString = prop.getProperty("autoActivatingController"); - - if(autoActivatingControllerString != null){ //We don't combine the if statements to keep the default value. - if(autoActivatingControllerString.equals("true")){ + + if (autoActivatingControllerString != null) { // We don't combine the if statements to keep the default value. + if (autoActivatingControllerString.equals("true")) { Settings.AUTO_ACTIVATE_CONTROLLER = true; - }else{ + } else { Settings.AUTO_ACTIVATE_CONTROLLER = false; } }