rewrote gamepad stuff to not use JInput

This commit is contained in:
Diego Waxemberg
2013-12-30 22:13:25 -05:00
parent 8bd6a9d07f
commit 5396ce03ed
10 changed files with 373 additions and 708 deletions

View File

@@ -8,6 +8,7 @@ import com.limelight.binding.LibraryHelper;
import com.limelight.binding.PlatformBinding;
import com.limelight.gui.MainFrame;
import com.limelight.gui.StreamFrame;
import com.limelight.input.gamepad.Gamepad;
import com.limelight.input.gamepad.GamepadListener;
import com.limelight.nvstream.NvConnection;
import com.limelight.nvstream.NvConnectionListener;
@@ -55,9 +56,7 @@ public class Limelight implements NvConnectionListener {
VideoDecoderRenderer.FLAG_PREFER_QUALITY,
PlatformBinding.getAudioRenderer(),
PlatformBinding.getVideoDecoderRenderer());
GamepadListener.startSendingInput(conn);
GamepadListener.getInstance().addDeviceListener(new Gamepad(conn));
}
/*
@@ -80,13 +79,6 @@ public class Limelight implements NvConnectionListener {
}
}
/*
* Starts up a thread that listens for gamepads connected to the system.
*/
private static void startControllerListener() {
GamepadListener.startUp();
}
/*
* Creates the main frame for the application.
*/
@@ -94,7 +86,6 @@ public class Limelight implements NvConnectionListener {
MainFrame main = new MainFrame();
main.build();
limeFrame = main.getLimeFrame();
startControllerListener();
}
/**
@@ -177,7 +168,6 @@ public class Limelight implements NvConnectionListener {
@Override
public void connectionStarted() {
streamFrame.hideSpinner();
GamepadListener.startSendingInput(conn);
}
/**