mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-20 20:52:18 +01:00
DroidFish: Use different RTB path for network engines and local engines.
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user