Set link timeout default to 500ms, fix prev. dflt.
Default the linkTimeout ConfigManager variable to 500 (milliseconds.) Detect if the previous default is set, which 1, and set to 500, to repair existing configurations. This may reduce the amount of reports about link being broken, as some people have certainly not checked this setting, and the default should not be so wrong. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
136c094f0c
commit
4aab08c47b
|
@ -193,7 +193,7 @@ int linkAuto;
|
||||||
int linkHacks = 1;
|
int linkHacks = 1;
|
||||||
int linkMode;
|
int linkMode;
|
||||||
int linkNumPlayers;
|
int linkNumPlayers;
|
||||||
int linkTimeout = 1;
|
int linkTimeout = 500;
|
||||||
int maxScale;
|
int maxScale;
|
||||||
int mouseCounter = 0;
|
int mouseCounter = 0;
|
||||||
int movieFrame;
|
int movieFrame;
|
||||||
|
@ -521,7 +521,13 @@ void LoadConfig()
|
||||||
linkHostAddr = ReadPrefString("LinkHost", "localhost");
|
linkHostAddr = ReadPrefString("LinkHost", "localhost");
|
||||||
linkMode = ReadPref("LinkMode", 0); // LINK_DISCONNECTED = 0
|
linkMode = ReadPref("LinkMode", 0); // LINK_DISCONNECTED = 0
|
||||||
linkNumPlayers = ReadPref("LinkNumPlayers", 2);
|
linkNumPlayers = ReadPref("LinkNumPlayers", 2);
|
||||||
linkTimeout = ReadPref("LinkTimeout", 1);
|
|
||||||
|
linkTimeout = ReadPref("LinkTimeout", 500);
|
||||||
|
|
||||||
|
// Previous default was 1, which is very wrong.
|
||||||
|
if (linkTimeout <= 1)
|
||||||
|
linkTimeout = 500;
|
||||||
|
|
||||||
loadDotCodeFile = ReadPrefString("loadDotCodeFile");
|
loadDotCodeFile = ReadPrefString("loadDotCodeFile");
|
||||||
maxScale = ReadPref("maxScale", 0);
|
maxScale = ReadPref("maxScale", 0);
|
||||||
movieRecordDir = ReadPrefString("movieRecordDir");
|
movieRecordDir = ReadPrefString("movieRecordDir");
|
||||||
|
|
|
@ -673,6 +673,10 @@ void load_opts()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make sure linkTimeout is not set to 1, which was the previous default.
|
||||||
|
if (linkTimeout <= 1)
|
||||||
|
linkTimeout = 500;
|
||||||
|
|
||||||
// recent is special
|
// recent is special
|
||||||
// Recent does not get written with defaults
|
// Recent does not get written with defaults
|
||||||
cfg->SetPath(wxT("/Recent"));
|
cfg->SetPath(wxT("/Recent"));
|
||||||
|
|
Loading…
Reference in New Issue