DroidFish: Use different RTB path for network engines and local engines.

This commit is contained in:
Peter Osterlund
2014-07-07 22:23:18 +00:00
parent c3acf44ac8
commit 2b7011acfe
5 changed files with 17 additions and 3 deletions

View File

@@ -979,6 +979,8 @@ public class DroidFish extends Activity implements GUIInterface {
rtbPath = extDir.getAbsolutePath() + sep + rtbDefaultDir;
}
engineOptions.rtbPath = rtbPath;
String rtbPathNet = settings.getString("rtbPathNet", "").trim();
engineOptions.rtbPathNet = rtbPathNet;
setEngineOptions(false);
setEgtbHints(cb.getSelectedSquare());

View File

@@ -28,6 +28,7 @@ public final class EngineOptions {
public String gtbPath; // GTB directory path
public String gtbPathNet; // GTB directory path for network engines
public String rtbPath; // Syzygy directory path
public String rtbPathNet; // Syzygy directory path for network engines
public String networkID; // host+port network settings
public EngineOptions() {
@@ -39,6 +40,7 @@ public final class EngineOptions {
gtbPath = "";
gtbPathNet = "";
rtbPath = "";
rtbPathNet = "";
networkID = "";
}
@@ -51,6 +53,7 @@ public final class EngineOptions {
gtbPath = other.gtbPath;
gtbPathNet = other.gtbPathNet;
rtbPath = other.rtbPath;
rtbPathNet = other.rtbPathNet;
networkID = other.networkID;
}
@@ -68,6 +71,7 @@ public final class EngineOptions {
gtbPath.equals(other.gtbPath) &&
gtbPathNet.equals(other.gtbPathNet) &&
rtbPath.equals(other.rtbPath) &&
rtbPathNet.equals(other.rtbPathNet) &&
networkID.equals(other.networkID));
}

View File

@@ -209,8 +209,8 @@ public class NetworkEngine extends UCIEngineBase {
gaviotaTbPath = engineOptions.gtbPathNet;
setOption("GaviotaTbPath", engineOptions.gtbPathNet);
setOption("GaviotaTbCache", 8);
syzygyPath = engineOptions.rtbPath;
setOption("SyzygyPath", engineOptions.rtbPath);
syzygyPath = engineOptions.rtbPathNet;
setOption("SyzygyPath", engineOptions.rtbPathNet);
}
optionsInitialized = true;
}
@@ -228,7 +228,7 @@ public class NetworkEngine extends UCIEngineBase {
return false;
if (hasOption("gaviotatbpath") && !gaviotaTbPath.equals(engineOptions.gtbPathNet))
return false;
if (hasOption("syzygypath") && !syzygyPath.equals(engineOptions.rtbPath))
if (hasOption("syzygypath") && !syzygyPath.equals(engineOptions.rtbPathNet))
return false;
return true;
}