added support for *almost* every key

This commit is contained in:
Diego Waxemberg
2013-12-08 14:43:17 -05:00
parent 150d372213
commit a7c357a67f
6 changed files with 55 additions and 11 deletions

View File

@@ -15,6 +15,7 @@ public class Limelight implements NvConnectionListener {
private String host;
private StreamFrame streamFrame;
private NvConnection conn;
private boolean connectionFailed;
public Limelight(String host) {
this.host = host;
@@ -80,8 +81,11 @@ public class Limelight implements NvConnectionListener {
@Override
public void connectionTerminated(Exception e) {
e.printStackTrace();
JOptionPane.showMessageDialog(streamFrame, "The connection failed unexpectedly", "Connection Terminated", JOptionPane.ERROR_MESSAGE);
conn.stop();
if (!connectionFailed) {
connectionFailed = true;
JOptionPane.showMessageDialog(streamFrame, "The connection failed unexpectedly", "Connection Terminated", JOptionPane.ERROR_MESSAGE);
conn.stop();
}
}
@Override