From 29fe7917a0d6d630b37e044a5d1115013993c64d Mon Sep 17 00:00:00 2001 From: Ash Date: Thu, 13 Apr 2017 13:33:09 +1000 Subject: [PATCH] [OSX] Change filtering behavior, GUI fix Opening a mouse turns it off for whatever reason. This can be hard to deal with on a mouse-based OS like OSX. --- src/net/ash/HIDToVPADNetworkClient/gui/GuiInputControls.java | 2 +- src/net/ash/HIDToVPADNetworkClient/util/Settings.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/net/ash/HIDToVPADNetworkClient/gui/GuiInputControls.java b/src/net/ash/HIDToVPADNetworkClient/gui/GuiInputControls.java index e3f654e..7de5b27 100644 --- a/src/net/ash/HIDToVPADNetworkClient/gui/GuiInputControls.java +++ b/src/net/ash/HIDToVPADNetworkClient/gui/GuiInputControls.java @@ -87,7 +87,7 @@ public final class GuiInputControls extends JPanel { }); ipTextBox = new JTextField(); - ipTextBox.setColumns(15); + ipTextBox.setColumns(14); ipTextBox.setText(Settings.getIpAddr()); JPanel ipTextBoxWrap = new JPanel(new FlowLayout()); ipTextBoxWrap.add(new JLabel("IP: ")); diff --git a/src/net/ash/HIDToVPADNetworkClient/util/Settings.java b/src/net/ash/HIDToVPADNetworkClient/util/Settings.java index a24dc9a..b67617d 100644 --- a/src/net/ash/HIDToVPADNetworkClient/util/Settings.java +++ b/src/net/ash/HIDToVPADNetworkClient/util/Settings.java @@ -67,6 +67,7 @@ public final class Settings { } File configFile = getConfigFile(); if (!configFile.exists()) { + ControllerFiltering.setDefaultFilterStates(); log.info("Creating " + configFile.getAbsolutePath() + " with default values..."); try { configFile.createNewFile(); @@ -209,7 +210,7 @@ public final class Settings { public static enum Type { HIDGAMEPAD (0, "HID Gamepads", Platform.LINUX.mask | Platform.WINDOWS.mask | Platform.MAC_OS_X.mask), HIDKEYBOARD (1, "HID Keyboards", Platform.LINUX.mask | Platform.MAC_OS_X.mask), - HIDMOUSE (2, "HID Mice", Platform.LINUX.mask | Platform.MAC_OS_X.mask), + HIDMOUSE (2, "HID Mice", Platform.LINUX.mask), HIDOTHER (3, "Other HIDs", Platform.LINUX.mask | Platform.WINDOWS.mask | Platform.MAC_OS_X.mask), LINUX (4, "Linux controllers", Platform.LINUX.mask), XINPUT (5, "XInput controllers", Platform.WINDOWS.mask); @@ -246,7 +247,7 @@ public final class Settings { filterStates[filter.index] = state; } public static boolean getFilterState(Type filter) { - return filterStates[filter.index] || !filter.isSupportedOnPlatform(); + return filterStates[filter.index]; } public static void setDefaultFilterStates() { filterStates[Type.HIDGAMEPAD.index] = true;