Commit fc3d9ca0 authored by petter's avatar petter

Changed frequency of Errormessage to every 15 seconds to give the user the...

Changed frequency of Errormessage to every 15 seconds to give the user the chance to close the Window

git-svn-id: https://www2.in.tum.de/repos/ttt/trunk@150 0463f305-d864-43cb-8a47-61cf597d4139
parent 3cdaa16a
// TeleTeachingTool - Presentation Recording With Automated Indexing
//
// Copyright (C) 2003-2008 Peter Ziewer - Technische Universitt Mnchen
// Copyright (C) 2003-2008 Peter Ziewer - Technische Universit�t M�nchen
//
// This file is part of TeleTeachingTool.
//
......@@ -346,6 +346,7 @@ public class RFBConnection implements Connection {
}
// read server initialisation
private int resChangeErrorCount = 15;
private void readServerInit(DataInputStream initializationDataInputStream) throws IOException {
int framebufferWidth = initializationDataInputStream.readUnsignedShort();
int framebufferHeight = initializationDataInputStream.readUnsignedShort();
......@@ -354,9 +355,11 @@ public class RFBConnection implements Connection {
if ((prefs.framebufferHeight > 0 && prefs.framebufferHeight != framebufferHeight)
|| (prefs.framebufferWidth > 0 && prefs.framebufferWidth != framebufferWidth)) {
if (resChangeErrorCount++>=16) {
TTT.showMessage("Resolution of remote desktop has changed - NOT SUPPORTED BY TTT\n"
+ "Please close and restart TTT Recorder", "Reconnection Error", JOptionPane.ERROR_MESSAGE);
resChangeErrorCount=0;
}
// TODO: close recorder
throw new IOException("Cannot reconnect: Resolution of remote desktop has changed");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment