mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-13 09:32:39 +01:00
DroidFish: In computeNetEngineID(), don't read the whole engine file when the engine is not a network engine.
This commit is contained in:
@@ -1224,9 +1224,11 @@ public class DroidFish extends Activity implements GUIInterface {
|
|||||||
String id = "";
|
String id = "";
|
||||||
try {
|
try {
|
||||||
String engine = settings.getString("engine", "stockfish");
|
String engine = settings.getString("engine", "stockfish");
|
||||||
String[] lines = Util.readFile(engine);
|
if (EngineUtil.isNetEngine(engine)) {
|
||||||
if (lines.length >= 3)
|
String[] lines = Util.readFile(engine);
|
||||||
id = lines[1] + ":" + lines[2];
|
if (lines.length >= 3)
|
||||||
|
id = lines[1] + ":" + lines[2];
|
||||||
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
}
|
}
|
||||||
engineOptions.networkID = id;
|
engineOptions.networkID = id;
|
||||||
|
|||||||
Reference in New Issue
Block a user